Live data from Hacker News

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

artima.com

41–50 of 65 posts

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

#41
Scala definitely needs more people like Bruce Eckel to start explaining it. I understood several concepts from this article that have eluded me so far because every other article I found descended in to abstract concepts of language or type theory without explaining what the practical uses of things were.

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.

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

#42

Earlier quoted context omitted.

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.

Interesting. This is a common perception but not an easily justified one. A macro-system a-la Lisp (or Nemerle) could easily replace compiler plugins, and there is an active compiler plugin community so extensions to the compiler are desirable. As someone who writes in Scala every day for a living and have used the built-in XML support here and there I do not consider Scala syntax to be complex, but the XML support is ~eh~.

Despite limitations and warts it's a pretty nice language to code in on a daily basis if you're going to code on the JVM. Macros would definitely enhance Scala's productivity. If you don't like them don't use them. Certainly doesn't mean that others could not put such a tool to good use.

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

#43
post #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 langua…

I only have one complaint about Clojure. It is very unfortunately named. Closures, the programming construct, and Clojure are too similar sounding.

If I could rename Clojure and GIMP I'd do so in a heartbeat.

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

#44

Earlier quoted context omitted.

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.

Nemerle already does it: http://nemerle.org/macros.html, so does Template Haskell: http://www.haskell.org/haskellwiki/Template_Haskell

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

#45
post #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 langua…

I only have one complaint about Clojure. It is very unfortunately named. Closures, the programming construct, and Clojure are too similar sounding. If I could rename Clojure and GIMP I'd do so in a heartbeat.

> Closures, the programming construct, and Clojure are too similar sounding.

They sound identical, in fact, when Clojure is pronounced properly.

http://en.wikipedia.org/wiki/Clojure

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

#46
post #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 langua…

I only have one complaint about Clojure. It is very unfortunately named. Closures, the programming construct, and Clojure are too similar sounding. If I could rename Clojure and GIMP I'd do so in a heartbeat.

I actually like that both Clojure and Scala have names that otherwise don't mean something else. This unambiguity means you can more easily search for related pages and get more meaningful data out of Google Trends. Java will bring up some coffee references and the island in Indonesia. Python is, well, obvious. Just as two examples.

I'd much rather everything not also be something else.

GIMP is actually appropriate because AFAIC the program is completely crippled.

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

#47

Maybe I missed something, but there is nothing in there that gives me the feel of a dynamically typed language. What he describes feels more like Haskell than Python.

Perhaps by "feels like a dynamic language" he means "is succinct".

Reminds me of this classic comment by Frank Atanassow on Lambda the Ultimate: http://lambda-the-ultimate.org/node/1562#comment-18623

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

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

#48

Earlier quoted context omitted.

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.

Interesting. This is a common perception but not an easily justified one. A macro-system a-la Lisp (or Nemerle) could easily replace compiler plugins, and there is an active compiler plugin community so extensions to the compiler are desirable. As someone who writes in Scala every day for a living and have used the built-in XML support here and there I do not consider Scala syntax to be complex, but the XML support i…

That's the problem with macros. It's hard enough to read Scala code as it is if the author wants to be clever. Throw in macros and it's game over. In languages with relatively inflexible or primitive syntaxes macros are a blessing but I think they're unnecessary in Scala.

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

#49
post #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 langua…

I'd encourage you to give some actual Scala coding a try. It can look dauntingly complex in short snippets and people often showoff complex stunts with the type system but once you actually start coding it makes a lot more sense.

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.

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

#50

Earlier quoted context omitted.

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.

You don't typecheck macros since they run at compile time. You typecheck the expanded code instead.
Post reply on HN