www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Scala Programming Language

reply sailormoontw <sailormoontw_member pathlink.com> writes:
Scala :
http://scala.epfl.ch/index.html

At the first stance the language is cool. Though I don't like the
Javascript-like syntax, and running in JVM makes it slow, and it's slower than
Java because it has another layer over JVM.

However, in the development of D, I still think some features can be
referenced...

By the way, the regular expression page of D
http://www.digitalmars.com/d/regular-expression.html
In the beginning it introduces the class RegExp, but in the following article,
the programs are written without the class RegExp, just the functions from
std.regexp take strings as input, why??
Jun 27 2006
parent Rémy Mouëza <ray.jay.ay.moueza DoNtSpAm.gmail.com> writes:
In article <e7sp9q$p1n$1 digitaldaemon.com>, sailormoontw says...
Scala :
http://scala.epfl.ch/index.html

At the first stance the language is cool. Though I don't like the
Javascript-like syntax, and running in JVM makes it slow, and it's slower than
Java because it has another layer over JVM.

However, in the development of D, I still think some features can be
referenced...

By the way, the regular expression page of D
http://www.digitalmars.com/d/regular-expression.html
In the beginning it introduces the class RegExp, but in the following article,
the programs are written without the class RegExp, just the functions from
std.regexp take strings as input, why??

The std.regexp functions instanciate a RegExp object, passing the argument string to the constructor, then compile the regexp object to a more efficient internal form and then call the corresponding method and finally return the result. That helps the D programmer to write more concise code. Like this : # RegExp aFunction ( char [] aString ) # { # auto regexp = new RegExp ( aString ); # regexp.compile (); # return regexp.aMethod (); # }
Jun 28 2006