Live data from Hacker News

Scala – 1 Star – Would Not Program Again

overwatering.org

161–170 of 324 posts

Re: Scala – 1 Star – Would Not Program Again

#161
post #43
post #23

Earlier quoted context omitted.

I'll echo all of this (minus scalaz, we don't use that). I'll give an example of the power of Scala's type system. When I first convinced one of our founders to give Scala a try, he used it to write the first pass of our analytics service. He'd never written Scala before but once it compiled, it ran correctly on the first try, that's the power of its type system.

Not to be too big of an ass, but this could just be the skill of your founder. Or do you believe it is impossible to have compiling code that does not do as its author intended?

It's not impossible, but it's harder in Scala. Actually the closest comparison I could make would be Python, where I had a similar experience - as soon as my code stopped producing errors, it was doing what I wanted it to (the difference being that the errors were at runtime rather than compile time). Whereas in Java and C and even ML I've written programs that compiled correctly but did something very different from what they were meant to.

Re: Scala – 1 Star – Would Not Program Again

#162
post #93

The section on HTTP headers and typing is a little concerning to me. I've been making rust-http recently and (before I was aware of Spray) I felt strongly about the typing. So, I'd like to discuss this. Am I wrong after all? Here clearly is someone that disagrees with me. I think I should probably write up a long blog post on the topic explaining my reasoning and so forth. rust-http is, at present at least, rejecting…

> I take a similarly strong position for such strong typing. Why not add a weak checking for k-v strings? Something like during compile time: if not k in LIST_OF_WELLKNOWNS warn('Bad header maybe?') You don't have to use types to check this.

You don't have to use types, but if you do then the type system guarantees your checks are exhaustive, which is more effective than manually checking you've covered all the paths.

I really like the spray way. You can add a custom/nonstandard header by using RawHeader(key, value), but most of the time you use e.g. Headers.ContentType(MediaTypes.`application/json`), and it just completely eliminates a class of trivial but annoying bugs.

Re: Scala – 1 Star – Would Not Program Again

#164
post #150
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.

There's a lot of "seems" going around from people who haven't used the language, or dynamic-typing folk who obviously aren't going to pick a language that bets the farm on static types. As a long-time Java dev myself, Scala is solving problems you don't even realise you have, because you don't know to look for them. Powerful types, immutable state and FP make a world of difference for writing clear solutions, with be…

Actually I just want to reiterate, regardless of typing problems that CAN exist and be prevented by a compiler, I do t ha e those problems in my codebase and neither do most people.

Re: Scala – 1 Star – Would Not Program Again

#165
post #27

I'm always interested to see intelligent criticisms of one of my choice languages. Let's take a look at what he has to say: Slow build times complaint > It is essentially impossible to practice TDD in Scala simply due to the time it takes to compile. Hrmm, that's interesting, because it sure seems like other people are able to do this. I agree, the slow build times are annoying, but let's not exaggerate. SBT critique…

I worked with the article's author. The build system mentioned was not sbt but a custom, in house, thing that was really just a medium sized Scala program that was used to build a number of large C++ programs, libraries and some other things). There were no build scripts but just raw Scala code fragments distributed over the hundreds of directories involved. Overall it was a pretty awful system but it would have been awful in any language given the approach taken (I hated it with a passion).

Re: Scala – 1 Star – Would Not Program Again

#166

Problem: 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…

I tried Go for the same reasons. It looked to me like a statically typed Java, but in practice it was not the best experience. The Code is not more expressive than Java, but you lose all the good libs and tools from Java. Most annoying was the in ability to create concise mocks, because you cannot implement interfaces at runtime with Go.

Re: Scala – 1 Star – Would Not Program Again

#167
post #66
post #31

Scala can be summed up in one issue. http://play.lighthouseapp.com/projects/82401/tickets/98 I loved Play 1.x(early adopter also) but I have since moved on. I gave Play 2 a solid chance. Scala programmers seem to turn everything into some kind of academic paper.

I've been a critic of Play 2 on a number of occasions on HN but I don't understand the complaint. What is causing you to create URLs with trailing slashes?

It is not just about the trailing slashes.

I wanted to create pretty urls but I couldn't do it in a simple way because the developers thought that in a path can not be optional parts, like: /article/1/article-slug and /article/1

So they removed a useful feature. And it was in a 2.x -> 2.x+1 release... Yesterday it worked, today not. I was not happy. :)

http://stackoverflow.com/questions/14980952/routes-with-opti...

My othern concern with scala, what is mentioned in the article, is the operator usage.

How am I supposed to "invent" this "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)")` or in squeryl, converting a boolean into a "query boolean": ``` val fls = false fls.~.? ```

Other than these, I like it. When I am coding in JS or PHP I always praise the scala types/ compile time checks. I am almost afraid of dynamic typing since I tried scala. :)

Re: Scala – 1 Star – Would Not Program Again

#168
post #155

Earlier quoted context omitted.

Languages like Ruby and Python allow for expressive, high-level customization, metaprogramming, and DSL creation. However, especially in the latter, the potential chaos is curbed by a strong culture and encouragement of self restraint, readability, and simplicity. From the sound of it, this is not so true for Scala.

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.

Re: Scala – 1 Star – Would Not Program Again

#169
post #133

Earlier quoted context omitted.

> The only real outlier being Javascript which gets its popularity from being the only option for the browser. This is probably the reason for Javascript's popularity, but if you ignore some bad language design, Javascript is a very simple language with a very small number of concepts that you need to understand to start getting work done in it. Even Python (which I think is the simplest of the widely used dynamic la…

That doesn't qualify as simple in my book though. Javascript has fewer concepts that programmers need to keep in their heads, but they are horribly inconsistent and quirky. Python, on the other hand, is consistently designed so that there are very few cases where you get hit with unexpected behavior.

Well, to be fair, most unexpected behaviour in js comes from people not knowing the language, or people expecting js to behave like other languages. I do agree though, that js does have its share of design quirks.

Re: Scala – 1 Star – Would Not Program Again

#170

Question - the job/hiring post on hen for November has many positions for clojure and one definitively for Scala. Here, I see references to investment banks using scala. Has scala become a readable alternative to java, while most of the future focus is on clojure? Does anyone know how real life performance compares between both. From my viewpoint, scala is in use at several banks and Twitter - clojure doesn't really…

I think the real world popularity of scala is significantly higher than that of clojure (e.g. TIOBE rankings). I don't think there is any more "future focus" on clojure - scala is still making big new releases all the time, and IMO it will be easier for scala to gain clojure's flexibility and compile performance than for clojure to gain scala's safety and runtime performance.
Post reply on HN