Re: Enums vs. Algebraic Datatypes
Isaac Gouy <[email protected]>
| Newsgroups | gmane.comp.lang.nice.general |
|---|---|
| Message-ID | <[email protected]> |
> >there are two stories to tell: clearly explain the computational > >model of Nice; show how in-many-ways that can be similar to Java, > >and how in very important ways it's better than Java. > Where do you think those stories should be told? In different > documents, targeted to different audiences? Yes, different documents targeted to different audiences. 1) IMO The language manual must clearly explain the computational model of Nice (I've found it enormously confusing that Nice *seems* to be like Java). References to other languages in the language manual should be there purely to remove confusion about the meaning of some aspect of the Nice language (A Nice class is not like a Java class, a Nice method is not like a Java method). So I would take "The Programming Language Oberon2" as a model. To a large extent, the current manual is like that. In some places it slips into language comparisons: instead of Example 3.2, we need the explanation that appears down in "Type Parameters" but specifically for classes. In some places it give the motivation for a feature rather than focusing on the feature. So I would favour a thinner language manual with fuller coverage. 2) IMO there should be a seperate 'Nice Developer's Guide' that demonstrates canonical approaches to using Nice for common programming tasks. That's where we'd see Example 9.3, "Using Java from Nice", "Using Nice from Java", and other "how to" examples. 3) IMO we then have separate 'Why Nice?' language motivation and language comparison material. > In this definition, Nice is also a functional language ;-) Sure. Is there a defining characteristic? > One can call Nice object-functional, but that does not express the > presence of multi-methods. I don't have a catchy expression yet to > characterize it in one more, but that would be nice ;-) Seems to me that the defining characteristic is that Nice is a multimethod language. (We can see this in some of the feature discussions - what does it mean to have visibility modifiers in a multimethod language?) > So Nice is not class-based. I would say it's based on classes and > multi-methods (in datatype I don't hear the ability to build > hierarchies, which is fundamental) Or the role of class as object constructor. OTOH it's so easy to confuse a Nice class with a selfish class, that it would be nice to have some way to flag the difference. __________________________________ 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