Re: But is it Object-Oriented?
Isaac Gouy <[email protected]>
| Newsgroups | gmane.comp.lang.nice.general |
|---|---|
| Message-ID | <[email protected]> |
> >I believe that you can do that in SmallTalk and Objective C since
> > they have "open classes."
-snip-
> Right, there are two concepts: multiple-dispatch, and definition of
> (possibly mono)-methods outside classes ("open classes"). Smalltalk
> and Objective C
fyi in Smalltalk fields and methods are encapsulated by a class - no
"open classes", everything is an object.
Incidentally, scissors paper rock was implemented intentionally to
demonstrate that classes do not contain methods (that's why the example
uses objects instead of an enum or constants).
> >Functional language tutorials often teach recursion and higher-order
> >functions before records.
-snip-
Maybe because functional languages don't have extensible records, and
do have sum types? There's no shyness about introducing types:
"The Little MLer"
In the first 2 pages, types: integers, reals, bools, sum types and
recursive types.
So "A Little Nicer" would have an classes on page 2.
> >I agree both presentations are important but I think the "pure" view
> >is what belongs in the language manual and the "progressive" view
> >should go in a migration/interoperability manual.
> Agreed. If such documentation becomes available and parts of the
> manual become redundant, then we will be able to remove them.
Why not simply remove those sections from the manual and use them as
the initial sections in a growing user guide?
> >In particular, most of the support for modularity has not been
> >designed or implemented yet.
> Well, you can already write the kind of modular code that only
> multi-methods allow. What is missing is enforcing visibility. That
> does not really prevent you from anything, although it does miss the
> benefit of being sure a feature is not used out of its scope.
We can use Nice to make "modular" extensions to existing OO code that
uses classes to enforce visibility and encapsulation ;-)
Seems like we need to take visibility modifiers for a test drive.
__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click