151 points · by peod · 15y ago · 62 comments
Unfortunately I think it may have missed it's peak opportunity to catch on because of this kind of problem - and a chronically buggy and unstable Eclipse plugin - but we'll see.
You really can start by writing Java-in-Scala and then gradually making use of the more advanced features as you need them.
Clojure is great too, of course, but I think Scala is much more likely to gain a foothold in the programming mainstream.
If I could rename Clojure and GIMP I'd do so in a heartbeat.
I'd much rather everything not also be something else.
GIMP is actually appropriate because AFAIC the program is completely crippled.
They sound identical, in fact, when Clojure is pronounced properly.
> "Dynamic" is technical jargon used by programmers, meaning "good". It derives from the Latin dyno mite, meaning "I am extremely pleased", and is first recorded in the historical work Bona Aetas of noted Roman sage and pundit J.J. Walker. Its meaning evolved in the 4th century after monks copying an obscure manuscript on programming linguistics in their ignorance tried to deduce its meaning from context. [...]
(the comment continues at the link; read the whole thing, it's pretty funny whether or not you agree with the sentiment)
Summary: No. At the time that Scala was started, built-in support for XML showcased one area were object-oriented decomposition failed and functional programming proved quite useful. Today the benefits of FP are more well known, and it's generally agreed that if Scala were starting from scratch it would not include XML literals. However, given that XML literals are in the language already, that large code bases have come to rely on them, and that they generally don't get in the way if you don't use them, it's unlikely that they will be removed.
Macros for the win.
It is my understanding that a good macro system in a statically typed langauge is still an open research problem. I remember hearing that the Racket research group was still working on it for their typed Racket system, and that it was, at least as of a year ago, not possible to directly port macros from the standard language over to the typed language.
I also remember hearing that template Haskell is a relatively primitive macro system that very few Haskell developers currently actually use, but I'm not an expert in this area.
Scala is already cutting edge in a lot of ways. Expecting them to innovate in such a difficult and untrodden area on top of what they've already done is asking a little much, especially considering that it is meant to be a practical and not a research language.
I came across Sun's (now Oracle's?) open-source(GPL) fork of the JVM that allows for changing class internals on the fly. The following analogy comes to mind DCE VM : JVM :: DLR : CLR
I quote:
The class data structures of the Java HotSpot virtual
machine are immutable during the execution of a program.
While new classes can be loaded, it is not possible to
change existing classes (e.g. add/remove methods or
fields). This projects tries to relax this condition to
allow arbitrary changes to existing Java classes
(including changes to the class hierarchy) while running
a Java program.
This looks interesting http://ssw.jku.at/dcevm/ and wonder if runtimes of dynamic languages could make use of this.For example DynamicMethod, which represents a method reference that can be created at runtime and garbage-collected when no longer in use; similar to the lightweight method handlers in JSR 292.
That said, modifying existing classes on top of the CLR is not possible, unless it inherits from something like ExpandoObject, but you can pull the same trick in Java (though not as easily until JSR 292 comes out).
The fact that Scala uses the JVM, with a hacky workaround for type erasure, is suboptimal.
Scala's interop with Java libraries has been a huge, huge boon, and undoubtedly drove take-up where there otherwise would have been none. Scala has come this far in a decade. Python is 20 years old. Ruby is 16. Scala came a long way in a short time, and was probably resigned to the dustbin of "that would have been cool" languages without that interop.
Artima appears to have gone all-scala-all-the-time at some point in 2010. Weird.
All that painful refactoring and modularization that went into Rails 3 would have been a lot easier and, I suspect, less necessary if Rails had been written in Scala.
The reality is that complex features will be used and abused.
It's the first time I've seen "not lisp" as a checkbox feature. :)