Live data from Hacker News

Hello Haskell, Goodbye Scala

joshbassett.info

31–40 of 118 posts

Re: Hello Haskell, Goodbye Scala

#31
Anybody here has developed and deployed a Scala-based or/and Haskell-based project for production? I mean systems for business purpose where rubber meets the road with timeline to hit and budget to meet. Far too often the stories are shared by people who learned a new language for 3 months and implemented a pet system where only a few real users. Definitely I respect their zeal and curiosity, but I am more interested to know what the veterans are thinking

Re: Hello Haskell, Goodbye Scala

#32
If anyone wants an introduction to functional programming using Scala, I really recommend Martin Odersky's coursera course (https://class.coursera.org/progfun-2012-001/class). He restricts you to functional Scala; there isn't a mutated variable in the whole course. It isn't officially a course right now. You won't get a certificate for taking it, and I don't think the grader is turned on, but the other materials are still there.

In my mind, the really mind altering thing was seeing not just that Object Oriented and Functional programming styles could be compatible, but that they were in many ways complementary. Good OO design, particularly the idea of small single responsibility classes, is kind of enforced by functional style. If you need to pass around fifty variables just to increment a counter, you'd go crazy. So writing functionally forces you to figure out ways to split things up. Similarly, its easy to convert well small, single responsibility OO objects into functional ones, and just a nightmare otherwise.

I was just blown away at how much a course on functional programming helped me to understand OO design.

Re: Hello Haskell, Goodbye Scala

#33

Anybody here has developed and deployed a Scala-based or/and Haskell-based project for production? I mean systems for business purpose where rubber meets the road with timeline to hit and budget to meet. Far too often the stories are shared by people who learned a new language for 3 months and implemented a pet system where only a few real users. Definitely I respect their zeal and curiosity, but I am more interested…

At my company we started a Scala project a little over a year ago. Two of us had a Java background the other two had a C++ background. We targeted Scala 2.9, Akka 1.3, and ran it on JVM 1.6. For us the stack proved to be very easy to work with. The project spent about 5 months in development and has been in production for another 9 months with weekly updates.

What the author calls old habits, I call productivity. A lot of us started off coding imperatively and slowly started adapting functional along the way. It allowed us to get the best of both worlds. Over the past year we've definitely stumbled a few times (mutable objects for akka messages are really really bad), but overall we've been very happy with the stack.

One of the only real ongoing problems we are continuing to struggle with is limiting the impact of big GCs in production. Scala tends to generate more garbage then pure Java, so the GC has to work harder. Most of these objects are in the eden space, but we can run into memory fragmentation issues, which leads to eventual long compaction cycles.

Re: Hello Haskell, Goodbye Scala

#34

If anyone wants an introduction to functional programming using Scala, I really recommend Martin Odersky's coursera course ( https://class.coursera.org/progfun-2012-001/class ). He restricts you to functional Scala; there isn't a mutated variable in the whole course. It isn't officially a course right now. You won't get a certificate for taking it, and I don't think the grader is turned on, but the other materials ar…

Not to mention, functional programming forces you to grok recursion and higher-order functions. Huge side benefit of learning FP that you can also implement in your OOP to write more elegant methods. Never write "for int i..." again.

Re: Hello Haskell, Goodbye Scala

#35
post #17

Earlier quoted context omitted.

I personally find the "universe of knowledge" to attain an attraction, not a repellent.

I guess it depends in what context you're looking at it. What makes Java so successful is its simplicity. You can get fairly quickly up to speed on it, and you can have junior coders on it producing code quickly without shooting themselves in the foot too much or spending a couple of hours trying to find out how to update a tree efficiently. On the other hand, as a hobbyist, it's absolutely fantastic.

In the case of Java, the simplicity of language leads to complexity of programs.

The extra difficult-to-learn parts of Haskell makes for programs that are more practical, shorter and easier to work with.

There's a trade-off between simplicity and power - and we don't really want to maximize simplicity only. And if we did, Java would not be a good candidate either.

Re: Hello Haskell, Goodbye Scala

#37
post #20
post #11

For personal projects or for learning the principles of FP, there is nothing wrong with using Haskell. From personal experience however, I will not be using Haskell again for a larger professional project, because our team ran into too many time consuming issues and problems that have been solved successfully in other languages/environments (especially the JVM) like dependency management or reasoning over runtime cha…

What is a war file?

It's a zip file following Java convention that can be dropped in any Java web application server (like Apache Tomcat).

Basically a lot of sites you go to have been deployed by dropping a .war file in a Java web application server. That technologically powers a gigantic part of the Internet (just look at SO or Quora or expert exchange or any TIOOBE index or any Java job offer: Java webapps are pretty much powering the Real-World [TM]).

Re: Hello Haskell, Goodbye Scala

#38

Anybody here has developed and deployed a Scala-based or/and Haskell-based project for production? I mean systems for business purpose where rubber meets the road with timeline to hit and budget to meet. Far too often the stories are shared by people who learned a new language for 3 months and implemented a pet system where only a few real users. Definitely I respect their zeal and curiosity, but I am more interested…

Fairly certain that twitter used scala at some point for message passing (back-end); At one point Foursquare was using scala/lift for their web platform.

I'm not certain if this is still accurate; my information is pretty out of date.

Re: Hello Haskell, Goodbye Scala

#39
post #29

Earlier quoted context omitted.

Could you elaborate what 'real-world' means to you in this context? Millions of users, hundreds of servers, a personal blog? 'Real-world' is often a very broad term with a huge likelihood of misunderstandings.

Serving my real needs both for a professional job: * Debug information processing and analysis * Concurrent execution of tests * Build systems * Various automation/scripting needs and other auxiliary projects Also, in a different context, a structural editor for programming based on our own GUI framework (~10KLOC so far). This project is still preliminary but advancing at a (mostly) steady pace.

Thanks.

Re: Hello Haskell, Goodbye Scala

#40
post #11

For personal projects or for learning the principles of FP, there is nothing wrong with using Haskell. From personal experience however, I will not be using Haskell again for a larger professional project, because our team ran into too many time consuming issues and problems that have been solved successfully in other languages/environments (especially the JVM) like dependency management or reasoning over runtime cha…

Interestingly, despite their respective reputations Haskell is by far more popular than Scala: http://www.langpop.com/

Sure: In the "hacker" world it seems that people prefer Haskell (Purely functional, native code) to Scala (OO Hybrid, JVM).

However I'd say that Scala is far more popular for building bussiness/real software than Haskell is (Twitter for example).

Post reply on HN