Earlier quoted context omitted.
You never work with scripting languages? (i.e., why is there no Python, Ruby or Javascript in your lists? or maybe I do'nt know Haxe, does that replace them?)
Most of the stuff I work on is highly concurrent. GILs are the devil. Almost all the joy and ease you from GIL languages is lost as you try to go concurrent and have to use (in python for example) multiprocess and gevent ... then you start getting caught on the rough edges and poor ideas in those tools... and everything falls apart.
Scala – 1 Star – Would Not Program Again
281–290 of 324 posts
Re: Scala – 1 Star – Would Not Program Again
#282Earlier quoted context omitted.
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.
Is it actually possible? I've been using Scala for over a year and still have to spend more time learning about the language than writing code in it.
Re: Scala – 1 Star – Would Not Program Again
#283Earlier quoted context omitted.
>So Haskell doesn't do it justice because Haskells insistence on purity makes it impractical for me in getting stuff done I know this will sound snarky, but I have to ask: have you tried haskell before? I only ever hear that line of reasoning from people who have never used it (and I was once one of them, using that very same reasoning to choose a multi-paradigm language). We bailed on scala for haskell precisely bec…
"Useful for getting stuff done" is a point that Erik Meijer literally has made. F.i. you find him explaining his point of view on side effects and imperative programming here. And how he progressed from "fundamentalist" functional programming to "the real world is imperative & embrace side effects". http://youtu.be/a-RAltgH8tw?t=11m1s You can't say that Erik Meijer doesn't know Haskell. :-)
From the sound of it this is his first job in the "real world"? If that's the case, perhaps he just hasn't seen patterns of applying his current functional knowledge in a way thats better than the best practices from the imperative realm.
How do we know after a few years he won't switch (provided he was a fundamentalist functional programmer) back to saying "now that I have a better understanding of 'The real world' I can see patterns applied with the functional paradigm are better than the best practices I've been using from the imperative paradigm."?
I believe this is the reason to keep an ear open for authority figures, but not to take everything they say empirically, especially when it's in contradiction with a position they've held much longer.
Apologies for the rambling, I was just typing out what came to mind.
Re: Scala – 1 Star – Would Not Program Again
#284"My theory is that it was designed to experiment with advanced type and language features first, and only secondly became a language intended to be widely used." - I have same feeling about F# sometimes - OCAML is cool but too academic to be approachable.
Can you give an example of what you mean? I used ocaml for a few years, and never encountered anything I would consider academic at all, much less unapproachable.
Re: Scala – 1 Star – Would Not Program Again
#285Problem: author is pining for Go, and doesn't know it. Solution: author should abandon the JVM ecosystem and use Go. - Fast compiles. - Ultra simple, non extensible syntax, yet not verbose in practise. - The code you see is 100% of the code. - A culture of implementing the simple algorithm. - Stable, with version compatibility guarantees. - Nobody is trying to make the types jump through hoops, so the type inference…
If you hadn't mentioned Go, you could have described Java with these bullet points (with the exception of the last). Why throw away all the proven libraries, extremely good garbage collector, IDEs, intrumentation? Java is a perfectly fine language and if you think it is too verbose, there are good other options such as Kotlin, Groovy (which offers static typing nowadays), Ceylon etc.
Groovy's static typing is quite recent, written by one person only, and not actually used in many codebases. Neither Grails nor Gradle uses it.
There's only really 2 or 3 use cases for Groovy:
* quick & dirty scripts for Java class testing and manip
* Grails
* more recently, Gradle (which still ships with Groovy 1.x)
If you want static typing on the JVM, best use a language designed from the ground up to be staticly typed, e.g. Java, Scala, Kotlin, Ceylon.
Re: Scala – 1 Star – Would Not Program Again
#286Earlier quoted context omitted.
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.
Though my tip though for the long term replacement of javac is Scala. I'm very impressed with it! I can honestly say if someone had shown me the Programming in Scala book by by Martin Odersky, Lex Spoon & Bill Venners back in 2003 I'd probably have never created Groovy. So why Scala? Scala is statically typed and compiles down to the same fast bytecode as Java so its usually about as fast as Java (sometimes a little faster sometimes a little slower). e.g. compare how well Scala does in some benchmarks with groovy or jruby. Or this. Note speed isn't everything - there are times when you might want to trade code thats 10x slower for more productivity and conciseness; but for a long term replacement for javac speed is important.
His dissatisfaction with Groovy concerned more than just its speed, and originated much earlier, see his very last Groovy mailing list posting [2] in Dec 2005 just before he left the Groovy development team:
The MOP and introspection APIs do NOT solve the horribly broken name resolution rules in the current RI of Groovy [...] I see no argument yet for why we have to throw away decades of language research and development with respect to name resolution across the language as a whole [...] It just feels totally wrong to break Closures across the entire language just because of some use cases for Markup.
Groovy is sloooooooow, its recent static typing is buggugguggy and not even used by Grails or Gradle, and its closures are broken. Its "recent surge in popularity" was also probably based on deception [3]:
Groovy, which turned up in the [Tiobe] 18th spot last month [October 2013], slid back down to a number 32 ranking [Nov 2013]. "After a long discussion with one of the Tiobe index readers, it turned out that the data that is produced by one of the Chinese sites that we track is interpreted incorrectly by our algorithms. So this was a bug," Janssen said. "After we had fixed this bug, Groovy lost much of its ratings." The ratings slip takes Groovy from a 0.658 percent rating last month to 0.393 percent this month.
This has happened before. In April 2011, Groovy fell from #25 to #65 on Tiobe in a single month after they increased the number of search engines they monitor. Groovy had begun its short-lived rise just after December 2010 when Groovy tech lead Jochen Theodorou "volunteered" his services to Tiobe to help them improve their algorithms.
[1] http://macstrac.blogspot.com/2009/04/scala-as-long-term-repl...
[2] http://groovy.329449.n5.nabble.com/Paris-write-up-tt395560.h...
[3] http://www.infoworld.com/t/application-development/c-pulls-a...
Re: Scala – 1 Star – Would Not Program Again
#287Earlier quoted context omitted.
>So Haskell doesn't do it justice because Haskells insistence on purity makes it impractical for me in getting stuff done I know this will sound snarky, but I have to ask: have you tried haskell before? I only ever hear that line of reasoning from people who have never used it (and I was once one of them, using that very same reasoning to choose a multi-paradigm language). We bailed on scala for haskell precisely bec…
"Useful for getting stuff done" is a point that Erik Meijer literally has made. F.i. you find him explaining his point of view on side effects and imperative programming here. And how he progressed from "fundamentalist" functional programming to "the real world is imperative & embrace side effects". http://youtu.be/a-RAltgH8tw?t=11m1s You can't say that Erik Meijer doesn't know Haskell. :-)
That's true. But I can say that he is quite happy to tailor his message to his audience, If you listen to what he is saying, he is making the argument for haskell. He is just wording it for the PHP crowd. Haskell does allow side effects, which is entirely the point. But the "unwashed masses" as it were are under the misconception that it does not. So he has to take the "side effects are awesome" sales pitch, and kinda tosses haskell under the bus in the process. Unfortunate, and ironic given that haskell programmers genuinely feel that side effects are awesome, but what can you do?
Re: Scala – 1 Star – Would Not Program Again
#288Earlier quoted context omitted.
What an odd response. I haven't done any OO programming in nearly a decade, and I would not consider doing it ever again. I don't know where you got the idea that OO has anything to do with this. I do catch these sorts of errors early on, because they are type errors, and thus the compiler catches them. That is very much the point. The fact that you think you are infallible and can write 100% perfect test coverage, w…
Not odd at all; you were being condescending, trying to paint me as someone who isn't as good a programmer as you are. Maybe I'm not, but I've written some very robust systems code in my career, so don't be so quick to write people off. I don't think I'm infallible (straw man much?), but I do think that dead simple errors such as this would be caught by any amount of actual testing. That said, I wouldn't be against a…
You are suggesting that you are infallible, as the "dead simple errors" you refer to get out into production systems every single day. More than one serious security hole in rails has been due to very similar problems. You are very much implying that you are a better programmer than the entire rails team. And virtually everyone else, as examples of these kinds of bugs are everywhere.
And finally, crying straw man while presenting a straw man is poor form. If a particular library has a deficiency, that's unfortunate. But it has absolutely nothing to do with type safety. Haskell for example is more type safe, and it has two http client libraries, both of which provide safety while also allowing arbitrary headers (and methods, etc).
Re: Scala – 1 Star – Would Not Program Again
#289To 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.
Using null instead of None means you are more at risk of hitting a NPE. Here are a couple examples: myVar match { case Some(val) => doSomething(val) case None => handleNone() } myVar.getOrElse("else") In both of these cases, we eliminated the possibility of a NPE through the use of a language feature. :) (edited for formatting)
I think he's aware of that - he said he's using Scala as a better Java, what would Java be without the odd NPE?
Re: Scala – 1 Star – Would Not Program Again
#290Earlier quoted context omitted.
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.
Java 8 for me is still far from making me move from Scala. Lambda expressions is only a small part of what I like about Scala. For me Scala is a statically typed Ruby / Python / JavaScript that runs on the JVM, and is very Java like. I would change some things in it, but a language doesn't have to be revolutionary to make me want to use it. Things I have in Scala that I like and Java 8 won't provide (many are syntact…