Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[subject: first-class language]

 [1/3] from: rebol665::ifrance::com at: 11-Mar-2002 21:26


Hi rebollers, Digging the archives again ... On Wednesday, 12-sep-2001, Holger Kruse wrote :
> "Rebol is a first-class language ..." >
What is a first-class language ? Patrick

 [2/3] from: gerardcote:sympatico:ca at: 11-Mar-2002 21:26


Hello Patrick, Like you I was asking for the true meaning of "First-Class Anything", the Anything being one from the many offered choices : Datatype, Function, Object, Class, Language, etc... After some search on the Net for each one of these combinations, I found some satisfactory answers covering them all. Here is the summary and follows the List of articles Where I found some useful information : First, the term "First-Class" includes two related but different concepts, as far as I understood the enclosed reference material. The first one relates to the design and the implementation phase of a particular programming language to define how it can be used to describe itself using its own constructs to do so. So in this case the authors speak of reflexivity, meta-language and first-class environment. I don't know if these terms are completely equivalent however but they seem to be related in some way. The second view relates to the way a programmer can use any object and/or function that are enclosed in a particular programming language as if it was a native datatype. Authorized to do so with some programming languages, a programmer can then use, for example, a function in some way that other languages can't even accept, like assign as a value to a newly defined variable a newly defined function, or pass a function as a parameter to another one. This is what I understood and it is sufficiently clear to me without boring with the details for the moment. If someone else want to clarify or correct any misunderstood or badly presented conncept, please do so. I will benefit from this too. I just hope NOT being to far from the truth... Here are some of the few consulted references : 1. http://lists.w3.org/Archives/Public/www-rdf-logic/2000Oct/0072.html 2. ttp://www.cc.gatech.edu/computing/classes/cs2360/fall95/handouts/lab3.html (Look under the First-Class functions paragraph) 3. http://compilers.iecc.com/comparch/article/92-02-092 P.S. Sorry for the length of my explanations and/or the poor quality of my written English. I'm a French native speaker from Canada.

 [3/3] from: joel:neely:fedex at: 11-Mar-2002 20:13


Hi, Pat, pat665 wrote:
> On Wednesday, 12-sep-2001, Holger Kruse wrote : > > "Rebol is a first-class language ..." > > > > What is a first-class language ? >
Good question. Perhaps it is intended to convey the notion that all data types are first class types??? (Ladislav has already written effectively on the degree to which this is completely accurate.) I've seen the adjective phrase "first class" in computing science literature used to describe data types; a "first class type" has all of the rights and priveleges of any other data type, such as being able to be passed as a parameter to a function, returned as the value of a function evaluation, stored in a variable or data structure, etc. For example, see that phrase in the description of Pop-11 at: http://www.cs.bham.ac.uk/research/poplog/primer/node93.html#SECTION00071000000000000000 (mind the wrap!) For another example (of someone correcting a misuse of the term) see these on-line citations from 1992: http://compilers.iecc.com/comparch/article/92-02-090 http://compilers.iecc.com/comparch/article/92-02-092 http://compilers.iecc.com/comparch/article/92-02-093 http://compilers.iecc.com/comparch/article/92-02-096 The same usage occurs in the Mjolner pages describing the Beta language, at: http://www.mjolner.com/mjolner-system/beta_en.php in the following context: BETA includes the notion of pattern variable. This implies that patterns are first class values, that may be passed around as parameters to other patterns. Suresh Jagannathan, of the Yale University Department of Computer Science, published a paper under the title: Optimizing Analysis for First-Class Tuple-Spaces whose abstract begins: Abstract: This paper considers the design and optimization of a simple asynchronous parallel language that uses first-class tuple-spaces as its main communication and process creation device. Our proposed kernel language differs from other tuple- space languages insofar tuple-spaces are treated as true first- class objects. The full citation is available at: http://citeseer.nj.nec.com/jagannathan90optimizing.html The Revised**5 Report on the Algorithmic Language Scheme states in its introductory section: Scheme was one of the first programming languages to incorporate first class procedures as in the lambda calculus,... The published report on Objective Caml, at: http://caml.inria.fr/ercim.html also uses the concept: As all dialects of ML, Objective Caml possesses: First-class functions: functions can be passed to other functions, received as arguments or returned as results. ... and so on. As far as the phrase "first class language" is concerned, a Google search seems to reveal that it is primarily used in the colloquial sense of "high-quality" or "legitimate" or "capable of standing on its own", as in this editorial from the "Visual Basic Programmer's Journal" http://www.devx.com/premier/mgznarch/vbpj/2001/03mar01/en0103/en0103.asp which proclaims thusly: To its credit, Microsoft acknowledges that creating a first-class language for VB developers also means creating first-class documentation for the tool. But VB's help files have never been the tool's primary strength. or the (slightly less marketspeak-sounding) description of BML on the IBM AlphaWorks site, which says in part: it allows one to capture the inter-component structure of the application using a first-class language designed for that purpose and yet be able to compile it into 'regular' Java code with basically no performance loss. where, again, the colloquial sense seems to be that BML is not simply a markup or documentation language to describe Java Beans, but a language capable of actually being used to write code. Similar (slightly more marketspeak-sounding) descriptions from various sources promise that both Visual Basic and COBOL will be a first-class language on the Microsoft .NET Framework (implying that they might be as good as Visual C++, I suppose). I certainly hope all of us agree that REBOL is at least as good as COBOL, Visual Basic, or C++! ;-) -jn- -- ; sub REBOL {}; sub head ($) {@_[0]} REBOL [] # despam: func [e] [replace replace/all e ":" "." "#" "@"] ; sub despam {my ($e) = @_; $e =~ tr/:#/.@/; return "\n$e"} print head reverse despam "moc:xedef#yleen:leoj" ;