Jump to content

Talk:Reflective programming and Sylvester Q. Cannon: Difference between pages

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
(Difference between pages)
Content deleted Content added
Jon Awbrey (talk | contribs)
 
No edit summary
 
Line 1: Line 1:
'''Sylvester Quayle Cannon''' ([[1877]]–[[1943]]) (commonly known as '''Sylvester Q. Cannon''') was a member of the [[Quorum of the Twelve Apostles]] of [[The Church of Jesus Christ of Latter-day Saints]] from [[October 6]], [[1939]]–[[May 29]], [[1943]]. He was the son of [[George Q. Cannon]], an apostle. He was born in [[Salt Lake City, Utah]]. He studied at the [[University of Utah]] and the [[Massachusetts Institute of Technology]].
== Self-modifying code ==


==References==
How does reflection relate to [[self-modifying code]]? The terms are used in quite different contexts, of course, but aren't they really forms of the same thing? Self-modifying code is usually done in assembly language, and is normally considered bad form; reflection is usually considered a good thing, especially if the language is set up for it. I might at least add a "see also" to the other one on both pages. [[User:Benhoyt|Benhoyt]] 20:56, 22 December 2005 (UTC)
*{{cite book |
author=Cannon, Winfield Q. |
year=1998 |
title=Sylvester Quayle Cannon: Tall in character and stature |
publisher=Winfield Cannon and Wanda Cannon Trust |
id=ISBN B0006S3QZM
}}


==External resources==
== Is reflection slow? ==
{{start box}}
{{series box |
title= [[Quorum of the Twelve Apostles]] |
years= [[October 6]], [[1939]]–[[May 29]], [[1943]] |
before=[[Albert E. Bowen]] |
after= [[Harold B. Lee]] |
}}
{{end box}}


[[Category:1877 births|Cannon, Sylvester Quayle]]
I removed "Depending on the implementation, code with reflection tends to run slower than that without it." Sure, it does depend on the implementation, but I thought this was unhelpful, because it only applies to a particular kind of reflection. With many types of reflection, such as macros and code compiling code, the whole point is to make the result run faster.
[[Category:1943 deaths|Cannon, Sylvester Quayle]]
[[Category:Apostles of the Church of Jesus Christ of Latter-day Saints|Cannon, Sylvester Quayle]]
[[Category:Latter Day Saint leaders|Cannon, Sylvester Quayle]]
[[Category:Latter Day Saints|Cannon, Sylvester Quayle]]


For example, in [[Forth programming language|Forth]] you could add up the numbers from 0 to 9 with a loop, or with an unrolled, reflective-style loop:


{{LDS-stub}}
: count ( -- )
0 10 0 do i + loop . ;
count

: unrolled-count ( -- xt )
:noname
0 postpone literal
10 0 do
i postpone literal postpone +
loop
postpone . postpone ; ;
\ effectively ":noname 0 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + . ;"
unrolled-count execute

For a better, more "real-life" example, see Bruce Hoyt's [http://www.complang.tuwien.ac.at/forth/pentomino.fs Fast Pentomino Solver] written in Forth using generated [[macro]]s. [[User:Benhoyt|Benhoyt]] 20:26, 22 December 2005 (UTC)

== Emmited vs produced ==

Is the meaing of the word "emmited" here similar to the word "produced?" It might be easier for a non-programmer to understand the intended meaning if the word "produced" were used, since one reading this is probably already immersed in unfamiliar terminology that may have meanings beyond typical language.

Uh, aren't C# and Visual Basic.NET reflective languages? If not why not? They have runtime metadata. [[User:KellyCoinGuy|KellyCoinGuy]] 07:29, August 20, 2005 (UTC)

== Reflection in C ==
Humm, in fact the GNU C language does have some reflection capabilities, through the dl library. Here is the code example for that:

#define _GNU_SOURCE 1
#include <dlfcn.h>
int
main(void)
{
typedef int (*printf_t) (const char *format, ...);
printf_t the_printf;
the_printf = dlsym (RTLD_DEFAULT, "printf");
the_printf ("Hello %s!\n", "world");
return 0;
}

[[User:Behdad|Behdad]] 03:47, 23 September 2005 (UTC)
:That's not reflection, that's [[dynamic linking]], a form of [[late binding]]. It does allow you to do things you couldn't do statically, but it doesn't give you knowledge about the program's own structure like reflection does. You can't find out how many arguments a function takes or what procedures a library exports, for example, or dynamically create objects of a given type name, find out what members an aggregate type has, etc. If we can call this reflection at all, it's a very weak sort of reflection, and it's certainly not part of the language itself (support for dynamic linking comes from the environment; the language guarantees nothing). [[User:82.92.119.11|82.92.119.11]] 15:09, 25 November 2005 (UTC)

== Paradigm ==

This article should include a section on reflective programming as a paradigm. And the list of languages should also be presented in a multi-column tabular form, for better readability --[[User:Soumyasch|Soumyasch]] 10:00, 26 March 2006 (UTC)
:I will be trying to do so. --[[User:Soumyasch|Soumyasch]] 10:03, 26 March 2006 (UTC)

== Title is incorrect ==

Per Wikipedia's manual of style for capitalization, this should be at [[computational reflection]] if anything. Making this correction would require fixing the double redirects. [[User:Fredrik|Fredrik Johansson]] 12:11, 26 March 2006 (UTC)
:Google hits show Computational Reflection with both capital C and capital R --[[User:Soumyasch|Soumyasch]] 12:23, 26 March 2006 (UTC)
::Doesn't matter; it is Wikipedia's house style to capitalize only the first word in a title (with exception for proper nouns). See [[Wikipedia:Naming conventions (capitalization)]]. [[User:Fredrik|Fredrik Johansson]] 12:47, 26 March 2006 (UTC)

JA: The move from [[Reflection (computer science)]] to [[Computational reflection]] was ill-advised (if advised at all). Analogous considerations have come up many times before, for example, with all discipline-specific usages in mathematics, for instance, [[Group (mathematics)]] versus [[Mathematical group]]. If you think a little bit ahead ([[Partial lookahead (computer science)]]), you will perhaps see what kind of mess you are getting into with this strategy for disambiguation. [[User:Jon Awbrey|Jon Awbrey]] 13:46, 26 March 2006 (UTC)

Revision as of 22:39, 27 March 2006

Sylvester Quayle Cannon (18771943) (commonly known as Sylvester Q. Cannon) was a member of the Quorum of the Twelve Apostles of The Church of Jesus Christ of Latter-day Saints from October 6, 1939May 29, 1943. He was the son of George Q. Cannon, an apostle. He was born in Salt Lake City, Utah. He studied at the University of Utah and the Massachusetts Institute of Technology.

References

  • Cannon, Winfield Q. (1998). Sylvester Quayle Cannon: Tall in character and stature. Winfield Cannon and Wanda Cannon Trust. ISBN B0006S3QZM.

External resources

Template:Series box