Live data from Hacker News

Scala – 1 Star – Would Not Program Again

overwatering.org

101–110 of 324 posts

Re: Scala – 1 Star – Would Not Program Again

#101

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…

Strongly typed headers are great, but for the love of God please give us a back door. And I don't mean just a dictionary for every "unknown" header, but we should be able to override every "known" header as well. I'll give you a real-world example. Mono. HttpWebRequest used to store the Content-Size value as an int32. What about files larger than 4gb? Oops... That was a big problem for us. Thankfully Mono is open sou…

I have another good example. Please see this thread I posted to the Go mailing list a few months ago:

https://groups.google.com/forum/#!searchin/golang-nuts/s3/go...

The short summary is that Amazon S3 does not behave like a normal web server and expects HTTP path's to be "url encoded". S3 is pretty obviously something you would want to interoperate with. Go's http client (which isn't very strict at all) causes friction here.

Re: Scala – 1 Star – Would Not Program Again

#102
> The workflow I ended up with was to write a function without any type annotations. Ignore all the red lines of the IDE’s confusion. Compile the code. In the output look for a warning about (Long => Int) return value being ignored in a function returning Unit. Copy (Long => Int) into my code as the return type annotation of my function. Compile again.

That sounds like the most stupid way you could do things.

Re: Scala – 1 Star – Would Not Program Again

#103

I tried learning Clojure, I really did, and I have to agree, the syntax is simpler, but I can't really read Clojure or code in Clojure the way I do in Scala, I don't know why. Whenever I read articles about Scala, I keep finding it amusing, prehaps this is because I had experience with Java, but for me Scala is a life saver, can't go back to Java after this. And I won't go back to Ruby, Python or JavaScript. So I can…

You managed to say you really like Scala several times, without mentioning a single concrete thing you like about it.

Re: Scala – 1 Star – Would Not Program Again

#104

I tried learning Clojure, I really did, and I have to agree, the syntax is simpler, but I can't really read Clojure or code in Clojure the way I do in Scala, I don't know why. Whenever I read articles about Scala, I keep finding it amusing, prehaps this is because I had experience with Java, but for me Scala is a life saver, can't go back to Java after this. And I won't go back to Ruby, Python or JavaScript. So I can…

You managed to say you really like Scala several times, without mentioning a single concrete thing you like about it.

You are right, though I'm not trying to convince anyone, but I wrote some of my favorite features on another comment: https://news.ycombinator.com/item?id=6830814, thanks

P.s. I did mention I chose it via elimination, and due to a very subjective preference to typed languages.

Another plus for scala for me is this: I can use it at work.

Re: Scala – 1 Star – Would Not Program Again

#105

I'd say a lot of the critiques are fair but quite exaggerated. I work on a large Scala codebase and yes, the compile times for a fresh start across the codebase are very long, but TDD-type loops are very short, because you're generally waiting for two files (your test target and your test code). Still, the compiler performance in Scala is perhaps my chief criticism, though hardly a show-stopper. As codebases in any l…

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.

Once you start dwelling in the intricacies of a very complex type system, it becomes quite difficult to keep things easy to understand.

There's this joke about how a Haskell programmer's style on a hello world programme evolves with experience, starting from a very readable, sort of down to earth implementation, and turning out in its last iteration into a complex "mess" of abstract concepts, for sensibly the same result.

It's always possible to keep things simple, even in Scala, and the opposite is also true with a language known as simple, Java, because the type system happens to be quite powerful actually. People are tempted to make things complicated also because there is this prevalent programming style in the community.

Re: Scala – 1 Star – Would Not Program Again

#106
post #18

Earlier quoted context omitted.

I think it may be but I came to the Java ecosystem to escape RoR.... it seems we should be able to do better than emulating Rails minus the existing gem community, no? I have much more faith in the JVM but would like to see it provide a step beyond Rails rather than catching up. Play is nice because it is trying to accomplish this with Akka, though yes I see there are other issues. As mentioned in another comment, I'…

I'm trying to escape PHP, but terminal velocity is hard to achieve since now I have Laravel to work with. I'm looking to venture off either into JVM space or Go.

I tried the same thing. I now play with C and Nimrod... And just doubled down on PHP. You'd be amazed at how powerful it can be in the right hands... Or not, as you're using Laravel ;)

Re: Scala – 1 Star – Would Not Program Again

#107
post #46

Earlier quoted context omitted.

I've been wondering - having never used a web framework except for some RoR - what people miss in the idiomatic Clojure way of doing web (composing libraries like Ring, Compojure, Enlive etc). Care to share?

I was a full-time Rails developer until a crescendo of disillusionment finally cajoled me to learn Clojure. I don't really know that I miss anything. The things I might've thought I'd miss are the things that ended up souring the taste of Rails. Having to come up with my own abstractions or recreate familiar conventions or set up a database were areas where I had to cut my teeth, but I also had to cut my teeth on Rai…

I agree with my sibling, would love to know about your Clojure workflow/arch more!

Re: Scala – 1 Star – Would Not Program Again

#108
post #82

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…

But what practical problem is such a scheme actually solving? If I write response["headre"] = ... I have a bug, sure, but an obvious bug that will be fixed very quickly. With this type system I am now limited in an annoying way. I don't get it.

> I have a bug, sure, but an obvious bug that will be fixed very quickly.

People say the same thing about null pointer exceptions, but null pointer exceptions are a huge problem in practice. Every bug is "obvious" in retrospect.

Re: Scala – 1 Star – Would Not Program Again

#109

I started learning Scala almost a year ago at my latest job - we use it for production systems at a large multinational investment bank. Coming to Scala from experience including C, Java and Haskell, I intially found Scala quite difficult. It is true that there are some things in Scala that are not obvious to newcomers, and that are difficult to discover for yourself - such as the use of Implicits, and the strange pr…

> That the author complains about having types rather than a simple map for keys shows a misunderstanding of what they are there for - the idea is to allow the compiler to prove at run-time what is valid code and what isn't.

There's some evidence from what the author wrote he's aware of the benefits of type systems. The question he raises is whether the developers who wrote Spray modeled the problem domain well by choosing this particular set of types (his opinion is clearly no).

> the author makes a strange comment that H-M 'enabled' Monads, and the comment is written in a way that implies that Scala does not have Monads.

Given that the author immediately follows his "enabled" statement with the idea that monads can be used in a type-free language, I think it's most likely he means that H-M has been the ground where the use of monads has been largely developed/defined, not that monads can't be used in either Scala or even something with a considerably less expressive type system.

Re: Scala – 1 Star – Would Not Program Again

#110

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…

By and large, follow Postel’s law on this (http://en.wikipedia.org/wiki/Robustness_principle). As others have also said, though, make it not-too-hard to do things that your type system would otherwise restrict, because if I have to interact with a misbehaving server (including to the point where I have to send what would otherwise be invalid header data), then your strictness would make it too hard to do so.
Post reply on HN