Live data from Hacker News

Scala: The Static Language that Feels Dynamic (Bruce Eckel)

artima.com

31–40 of 65 posts

Re: Scala: The Static Language that Feels Dynamic (Bruce Eckel)

#31
post #30

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…

I'm not familiar with the DCE VM, but DLR is a library on top of the CLR, not a different version of the CLR.

Re: Scala: The Static Language that Feels Dynamic (Bruce Eckel)

#32
post #24

Earlier 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…

This looks pretty active: http://lamp.epfl.ch/~magarcia/ScalaNET/

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)

#33
post #25

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

I hope any of them get enough traction that I don't have to fight to code in something other than java :)

Re: Scala: The Static Language that Feels Dynamic (Bruce Eckel)

#34
post #26

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

Agreed.

Macros and reader macros ;-)

Re: Scala: The Static Language that Feels Dynamic (Bruce Eckel)

#35
post #2

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

There are several decent Scala-esque alternatives to the built-in XML support (with has many things broken about it). For instance: Anti-XML http://anti-xml.org/ and Scala-Scales: http://code.google.com/p/scala-scales/ they can't replace the functionality of the built-in support (need to alter parser/compiler for that), but are considerably more sane than the default functionality in scala.xml

Re: Scala: The Static Language that Feels Dynamic (Bruce Eckel)

#36
post #18
post #2

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

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)

#37
post #18

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

Disagree. Scala's syntax is already complex enough and flexible enough to all but eliminate the need for macros. XML literals were a marketing gimmick. More conventional XML support in a library would have been adequate.

Re: Scala: The Static Language that Feels Dynamic (Bruce Eckel)

#38

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

You need a sharp edge to cut the meat. In practice I find coding in Scala much easier than coding in C++.

Re: Scala: The Static Language that Feels Dynamic (Bruce Eckel)

#39

Earlier 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 ;-)

Let me know when you figure out how to statically type check those. You could publish a paper or two, I'm sure.

Re: Scala: The Static Language that Feels Dynamic (Bruce Eckel)

#40
This post may garner some down-vote for being non-rigorous, but I will offer my opinion on Scala so far. I accept it's good points readily enough when they are presented in list form, but when I read the language and try to reason in it, I just don't like it. Scala just doesn't feel like where I want to go. I do not want to embrace endless complexity in the form of hard-coded language features layered onto the language. XML literals instead of macros???? Please, I say. I have decided that Clojure will take the place in my dev life that Java and C# have occupied for the last 12 years. I hope that is the right decision.
Post reply on HN