On Aug 25, 2006, at 1:41 PM, Norman Palardy wrote:
This would work if we had first-class classes. But we don't, and
right now, you can't treat a class as an object in this way. The
shared methods and properties make a class *almost* exactly like a
module at the moment.
First class functions seem, to me, to be a characteristic of
certain kinds of languages (mainly scripting languages) and not
fully compiled languages like RB, C and C++.
Java may support first class classes, but this seems to be a
characteristic of the fact that it runs inside a VM and where you
can dynamically create the code for a class, compile it and then
load it into the VM.
Are there examples of compiled languages that support first-class
classes ?
Nothing to do with whether the language is compiled or not, other
than all kinds of things being easier to implement in an interpreted
language.
Popular compiled languages I know of that support first-class classes
are: Java, C#, Perl, Python (the latter two compile to byte-code
engines). There are other, less popular ones. In fact, I know of
only two OOP languages that *don't* support first-class classes (or
prototypes, which provides equivalent functionality). C++ actually
stands out for being a popular OOP language without first-class classes.
Guyren G Howe
Relevant Logic LLC
guyren-at-relevantlogic.com ~ http://relevantlogic.com
REALbasic, PHP, Python programming
PostgreSQL, MySQL database design and consulting
Technical writing and training
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>