I believe JVM now supports some restricted form of class re-definition at run time in debug mode. But it is quite limited. This is probably old hat for JVM hackers, I do not keep myself updated on the Java/JVM side of things. 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: T…
Scala: The Static Language that Feels Dynamic (Bruce Eckel)
31–40 of 65 posts
Re: Scala: The Static Language that Feels Dynamic (Bruce Eckel)
#32Earlier quoted context omitted.
Scala already compiles to the CLR, but support for it is nowhere near that for the JVM.
Last time I looked (early 2009), Scala compilation to the CLR was a bit of a joke. It targeted version 1.1 of the CLR, which had been superseded nearly 4 years earlier. I think the problem was with the predefined libraries. Supposedly you could get it to work with v2 but I never did. They also did themselves no favours by having the Scala compiler dump out MSIL assembler code rather than a .NET assembly. You had to s…
I'm not sure what relation his work has to the core Scala project or team, though.
Re: Scala: The Static Language that Feels Dynamic (Bruce Eckel)
#33Earlier quoted context omitted.
I think of it more in terms of natural selection. If, and this is a big if, diversity is greater in language x than in language y due to ease of trying ideas, then there is more opportunity to hit on good ideas.
The barrier to entry in Scala is definitely higher, and I do think this has limited its growth. To be honest, I don't think Scala is going to be the FP lang that really goes big, although I wish it were. I just hope Scala gets enough traction that I can find real work in the language. After using it for a while languages like Ruby and Python just feel primitive.
Re: Scala: The Static Language that Feels Dynamic (Bruce Eckel)
#34Earlier quoted context omitted.
Solution: move it to a library, like perl did with it's format syntax, and take it out of core.
This is hard because Scala's XML support affects the parser. At the lexical level. Scala does have compiler plugins, but it doesn't have parser plugins.
Macros and reader macros ;-)
Re: Scala: The Static Language that Feels Dynamic (Bruce Eckel)
#35The biggest thing that is still in the language that they should have removed early on is the native XML syntax support. If I were them I would take it out in 3.0 and break from that bad decision.
Re: Scala: The Static Language that Feels Dynamic (Bruce Eckel)
#36The biggest thing that is still in the language that they should have removed early on is the native XML syntax support. If I were them I would take it out in 3.0 and break from that bad decision.
Putting XML literals in the language just feels wrong. On the other hand, they've turned out to be damn useful when you're writing the back end for a web application.
Macros for the win.
Re: Scala: The Static Language that Feels Dynamic (Bruce Eckel)
#37Earlier quoted context omitted.
Putting XML literals in the language just feels wrong. On the other hand, they've turned out to be damn useful when you're writing the back end for a web application.
It was a mistake. A better effort would have been to implement a first-class Macro system a-la Lisp. You can see here that Nemerle supports macros and makes dealing with XML like relatively painless as if it were built in: http://nemerle.org/About/#ID0E6G Macros for the win.
Re: Scala: The Static Language that Feels Dynamic (Bruce Eckel)
#38Earlier quoted context omitted.
Scala looks complex on paper, but my experience has been that in practice it's not that bad. If you're designing a library you need to think hard about types but you can put together an app very quickly in Scala and with a lot fewer initial bugs than in a dynamically typed language.
You could say the same thing about C++ The reality is that complex features will be used and abused.
Re: Scala: The Static Language that Feels Dynamic (Bruce Eckel)
#39Earlier quoted context omitted.
This is hard because Scala's XML support affects the parser. At the lexical level. Scala does have compiler plugins, but it doesn't have parser plugins.
Agreed. Macros and reader macros ;-)