Live data from Hacker News

Scala – 1 Star – Would Not Program Again

overwatering.org

171–180 of 324 posts

Re: Scala – 1 Star – Would Not Program Again

#171
post #65

Scala looks sexy, sort of like weird haircut. But once haircut fascination is over - people expect you to do mundane tasks, like cook food or take out the garbage. Or they won't pay you. And then you realize that when Scala cannot do what you want - you can always revert to Java. And then you realize that you don't really need Scala-ing if you can do the same stuff in Java or any other strongly typed language.

>And then you realize that you don't really need Scala-ing if you can do the same stuff in Java or any other strongly typed language.

That's the turing completeness fallacy. Why not just write everything in C? And java's types are inadequate for doing really generic methods - how would you go about writing scalaz's "sequence" in java?

Re: Scala – 1 Star – Would Not Program Again

#172
post #11
post #7

Just shut up and use Java. It's fine.

And with Groovy as a scripting layer, it's more than fine. Quite good in fact.

IIRC the Groovy founder said he wouldn't've bothered making Groovy if he'd known Scala existed. You get all the power and flexibility without having to give up type safety.

Re: Scala – 1 Star – Would Not Program Again

#173

Earlier quoted context omitted.

I've developed and maintained multiple large systems in a team using various languages. I would much rather maintain a system written in Scala than either Java or various scripting languages we've used and the view is shared by the whole team. It's far less verbose than Java and very maintainable compared to other very large systems written in scripting languages.

There are other JVM languages that are far less verbose than Java, without the complexity of Scala, with better compile times, and better compatibility with plain-old Java. For instance, Kotlin.

Kotlin is not much simpler than Scala. It implements some of the Scala features in actually more complex and IMHO less elegant way,(pattern matching, null safety), copies some 1:1 (declaration site variance) and leaves out some of the most powerful ones (implicits, dependent types). I personally don't buy it. I like languages which offer few, but very general and powerful features / abstractions, than languages that concentrate on directly supporting special cases.

Re: Scala – 1 Star – Would Not Program Again

#174
post #155

Earlier quoted context omitted.

Scala is pulling out of that phase. Scalaz 7 removes a lot of the less-readable operators (e.g. you now have to write "Kleisli" rather than "☆"). The Requests HTTP library, long mocked for its periodic table of operators, has fallen out of favour (I'm not sure it's even maintained any more). I can't speak for SBT because I don't use it, but Spray is probably the nicest library for defining HTTP APIs I've ever used, i…

Wait. Scala has unicode operators ? Wow.

Scala doesn't make a distinction between operators and methods, and Java has always supported unicode in method names, so they have to be possible for compatibility if nothing else. I think if used carefully, with discipline, they can make code more readable and ultimately more maintainable - e.g. for doing set algebra it's nice to be able to have ∪ and ∩ methods. But yes, if you want to shoot yourself in the foot with them it's very easy.

Re: Scala – 1 Star – Would Not Program Again

#175
post #127

Earlier quoted context omitted.

Unlike you I finished reading the Odersky book and am very easily "Getting Shit Done" much faster than I ever did in Ruby. It did take effort to learn the language, but it was worth it. Having apps running an order of magnitude faster with better response times is just icing on the cake. Perhaps consider getting a gentler introduction to the language, the Odersky book is rather long and goes into excessive detail abo…

I've been in enough code reviews of Scala that did simple things like string processing that inevitably got sidetracked into a navel gazing discussion about type theory, pattern matching, and functional programming to not go near the language again anytime soon. You simply couldn't understand the code without understanding tons of incidental complexity about the language. The Clojure community has its navel gazing of…

Maybe you should first learn the language? It would save your time, really. You must know the language to understand programs in that language. Simple as that.

If you don't want to learn FP or you don't value type-safety, Scala is simply not for you.

Re: Scala – 1 Star – Would Not Program Again

#176

Earlier quoted context omitted.

I've developed and maintained multiple large systems in a team using various languages. I would much rather maintain a system written in Scala than either Java or various scripting languages we've used and the view is shared by the whole team. It's far less verbose than Java and very maintainable compared to other very large systems written in scripting languages.

There are other JVM languages that are far less verbose than Java, without the complexity of Scala, with better compile times, and better compatibility with plain-old Java. For instance, Kotlin.

Kotlin hasn't even been released yet, and it looks just like Scala.

Re: Scala – 1 Star – Would Not Program Again

#177

Earlier quoted context omitted.

I've developed and maintained multiple large systems in a team using various languages. I would much rather maintain a system written in Scala than either Java or various scripting languages we've used and the view is shared by the whole team. It's far less verbose than Java and very maintainable compared to other very large systems written in scripting languages.

We simply disagree on this. I would rather use almost anything else except the random DSL wasteland that is Scala. Even Ruby or Python (with the horrible GILs) is preferable. The groups I worked with made different determinations than your team, but if you guys love it, enjoy. Seriously, if you find a technology your whole team loves, you are KILLING it. Both companies I worked with have since dropped Scala (after li…

I would rather use almost anything else except the random DSL wasteland that is Scala

In my experience very little Scala code uses DSLs. Learning Scala isn't that tricky for anyone who knows Java, which is a pretty big pool.

Re: Scala – 1 Star – Would Not Program Again

#178
post #3

As a java Dev I have been watching Scala to see what people make of it. It seems like Scala is generally perceived as an academic exercise. We all want more powerful tools and infinite expression but at what point are we bikeshedding languages instead of building transparently clear solutions? Scala seems to be solving problems i dont have.

For an "academic exercise" it's getting used pretty widely by the likes of Twitter, Foursquare, Netflix etc.

Re: Scala – 1 Star – Would Not Program Again

#179
post #57

To be honest with you, I use Scala as a better Java. Which means I still code imperatively (and use null instead of None) but with less noise (semi colons etc). But, esp when working with collections, I take advantage of Scala's features. It's not perfect, but it works wonderfully. I can always revisit/refactor my code again later.

You might be better off using a pre-release snapshot of Java 8 as a better Java. You'll get closures, functional collections, and better type inference. I bet Eclipse and Intellij support it better too.

* You might be better off using a pre-release snapshot of Java 8 as a better Java. You'll get closures, functional collections, and better type inference. I bet Eclipse and Intellij support it better too.*

You lose out on most of the features of Scala, and IntelliJ supports Scala very well.

Re: Scala – 1 Star – Would Not Program Again

#180
post #91
post #38

Earlier quoted context omitted.

It is done statically . Types are a compile time construct, languages like Agda and Coq have no type information at runtime. This means if one can't statically prove that their types are correct the code won't compile. For example if my function returns a Vector[A, N] (a vector of A's with size N), and I try to pass it's return value to a function that expects a of type Vector[A, 2] my code will not compile. This is…

Not all things are statically checkable. If you want to take in some runtime data and treat it as a Vector[A, 3] then you'll need to include a dynamically failing check like (List -> Maybe (Vector n a)).

I don't know Agda or Coq but I assume all it would take is to test the size and throw a runtime error for it to statically assert that it is the correct size after the test. Now the compiler is helping you write the runtime preconditions checks and handling that you should be writing anyway.
Post reply on HN