Re: Enums vs. Algebraic Datatypes

Daniel Bonniot <[email protected]>
Newsgroups gmane.comp.lang.nice.general
Message-ID <[email protected]>
>>We do have the roadmap page which I think fills this role.
>>    
>>
>
>Maybe - the cvs news file and the roadmap seem to tell somewhat
>different stories.
>  
>
Can you give examples?

The NEWS file is only about what has been done so far, and it goes in 
much more details. The roadmap lists the things we want to focus on 
until the next major release (1.0 at the moment), and the details can be 
presented in the Wiki pages.

>>Bryn is doing a great job with the user manual. It obviously takes
>>time to come up with good examples and good way to present the
>>existing features.
>>    
>>
>
>The user manual is improving fast. I appreciate that it's virtually
>impossible for a Nice expert to retain an outsiders perspective. 
>
True. So it's very useful to hear about different opinions too.

>And
>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?

>>The big goal is to create a new language that is "more expressive,
>>more modular and safer" than Java, while not breaking existing
>>practices when they are fine (but focus on those that need to
>>change). The functional and the multi-method aspects are means to
>>this end.
>>    
>>
>
>In one sense "the functional aspects" are a matter of programming
>style. In contrast, Nice *is* a multimethod language - we can write
>code as-though it's Java but that's an illusion, we're using
>multimethods.
>  
>
There is the functional style, in which you avoid using state as much as 
possible. Yes, you could try that in Java, but it will be easier in Nice 
thanks to anonymous functions, tuples, ... It's aspects of the language 
that make that style more or less natural and easy to use.
According to my advisor, Didier Remy, a functional language is a 
language where functions are taken seriously. In this definition, Nice 
is also a functional language ;-)
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 ;-)

>"the biggest differences will be about Scala being class-based"
>So both Java and Scala are class-based; and Nice is not class-based,
>Nice is based on datatypes and multimethods?
>  
>
Class-based = classes have higher status than other aspects (methods in 
particular).
That comes usually with single-dispatch (selfish) languages.

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).

>Paradoxically, Nice's syntax is closer to Java, and Nice more
>effectively reuses Java libraries, but in a fundamental way Scala is
>more like Java - it's based around classes.
>  
>
Right ;-)

Language design is a complex but exciting field...

Daniel



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.