Live data from Hacker News

Scala Considered Harmful For Large Projects?

kirkwylie.blogspot.com

1–10 of 57 posts

Re: Scala Considered Harmful For Large Projects?

#2
"Ultimately, a programming language that's useful for large-scale programming projects needs to have clear, unambiguous grammar and syntax so that any developer familiar with the project and the language can instantly figure out what's going on."

I have a hard time swallowing the necessity to rely on restricting the expressive power of the language to prevent people from creating code that is hard to understand. My current project is in the order of 100 KLOC in Python (the horror, you can even redefine methods of single objects at runtime!) and so far none of the problems we've got can be tracked to language abuse.

Re: Scala Considered Harmful For Large Projects?

#3
post #2

"Ultimately, a programming language that's useful for large-scale programming projects needs to have clear, unambiguous grammar and syntax so that any developer familiar with the project and the language can instantly figure out what's going on." I have a hard time swallowing the necessity to rely on restricting the expressive power of the language to prevent people from creating code that is hard to understand. My c…

Turning that around, you think that in the presence of a powerful and expressive language it is nevertheless somehow easy or straight-forward to force people to create code that's easy to understand?

I'd be interested to read more of your thinking in this matter.

Re: Scala Considered Harmful For Large Projects?

#5
post #2

"Ultimately, a programming language that's useful for large-scale programming projects needs to have clear, unambiguous grammar and syntax so that any developer familiar with the project and the language can instantly figure out what's going on." I have a hard time swallowing the necessity to rely on restricting the expressive power of the language to prevent people from creating code that is hard to understand. My c…

Well, take a look at this sample (http://dispatch.databinder.net/Common_Tasks) and see if you can figure out what all those operators do just by looking at them :)

Thats the kind of abuse possible with languages such as Scala, Haskell or c++ templates.

Re: Scala Considered Harmful For Large Projects?

#6

    The problem is that if you have a language 
    designed to make it easy to do this, you 
    encourage people to do it.
As the author of the BASIC DSL[1] in question, I must say that it was decidedly not easy to do. It would appear that Baysick is the number one reason that Scala hasn't swept the enterprise.

[1]: http://github.com/fogus/baysick

Re: Scala Considered Harmful For Large Projects?

#7
post #4

This is really, Scala (and any of those extra JVM languages) considered a harmful addition for large java projects which makes a lot a sense. It surprises me a bit that it needs to be said, and said in such fashion.

The obvious comeback being large Java projects considered harmful.

Re: Scala Considered Harmful For Large Projects?

#9
post #2

"Ultimately, a programming language that's useful for large-scale programming projects needs to have clear, unambiguous grammar and syntax so that any developer familiar with the project and the language can instantly figure out what's going on." I have a hard time swallowing the necessity to rely on restricting the expressive power of the language to prevent people from creating code that is hard to understand. My c…

Python as a language does not lend itself to the same syntatic abuses as either Scala or C++ (or, for that matter, Perl). While you can certainly do some sketchy things, there's a pretty strong Python tradition of there being one standard way to do something, which is one of the language's strengths in my opinion, especially as you scale it up to larger projects. I'd also suggest that 100k is not a particularly large project; it's reasonably on the order of what a good developer can more or less be familiar with, and the real problems with expressive abuse come into play an order of magnitude or so above that that level, where it's impossible to be familiar with everything. Hence why the article was talking about the problems with bringing Scala into an existing, large project; if your code base is 10k LOC it's not nearly as problematic as if you have 1MM LOC, because with 10k you can reasonably remember anything (and obviously 100k is somewhere along the continuum).

If you'd said you worked on a 1MM LOC C++, Scala, or Perl project where you didn't have to establish strict coding standards to avoid the code base descending into madness, I'd be pretty shocked.

Re: Scala Considered Harmful For Large Projects?

#10
By his argument, Ruby is really bad for large-scale projects, due to its "language flexibility". (Lisp is just as bad, and Python not much better.)

All I can say is that this hasn't been my experience. It's not just that Rails makes good use of Ruby to define and use several internal DSLs (for validations, associations, etc.), or that many plugins do the same for other purposes (HAML for markup). The large rails app I use at work also has a few special-purpose internal DSLs of its own (for instance, to express permissioning restrictions), and they've made some things a whole lot easier to deal with.

These are features that can make a real mess, if abused, but bad programmers can make a mess in any language. The only real cure for that is to have programmers who have good enough judgment to avoid mistakes most of the time, and code review processes solid enough to catch the mistakes they make on their inevitable off days.

(Besides which, even raw Java isn't entirely free of "undesirable" flexibility these days. There are lots of setups these days in which annotations are used to augment or alter core language semantics, with the aid of runtime bytecode generation. I happen to think that's a good thing for their users. But I suppose one could disagree.)

Post reply on HN