Live data from Hacker News

Advanced programming languages (2009)

matt.might.net

11–20 of 208 posts

Re: Advanced programming languages (2009)

#12
This post is very fortuitous for me. I've been looking to learn a functional language and I had more or less narrowed my options to Haskell, OCaml and Scala. I liked the breakdown between these languages and the resources.

Can anyone who programs in Haskell or OCaml regularly tell me the current state of standard and third party library support? I'm very attracted to Scala because it has JVM support, which sounds fantastic for overall ecosystem maturity.

That said, I come from a C++ and Python background, so do I need to know Java well before learning Scala?

Re: Advanced programming languages (2009)

#13

I'm really surprised that "Learn you a Haskell" is not in the Haskell resources list.

I've seen people recommending this book more recently: http://haskellbook.com/ I'm not sure I like LYAH as a practical resource: It's silly and might put people at ease, but I wouldn't feel comfortable writing a database or parsing tool or compiler after reading it. Real World Haskell is better for these, but is a little dated by now.

LYAH is really good for getting you over the first big humps of learning Haskell, if you've never learned a language like Haskell before. I still really like it's explanation of monadic values. It builds up to them in a nice way. If you can pull open a GHCi session while reading that portion of the book and play around on the interpreter while reading it, you'll learn some good stuff. (As with many programming books, it may not seem logical, but I recommend typing out all the examples you find yourself. It works.)

It does not itself teach you much practical stuff. But if you learn what is in LYAH, you'll be pretty close to what you need to pick up most of the practical libraries in Haskell and understand the API level enough to use it, because once you get over that particular difference of Haskell's libraries, you can start working with them like you would any other language's libraries, and incrementally fold in the "Haskell special sauce" as you go, while you are at least learning things instead of stuck adding numbers together and filtering lists and all of the other handful of things you can do without files, network, or anything else you need an IO-based library for.

Re: Advanced programming languages (2009)

#15

I personally would really hesitate before picking a language that will be hard to hire for to build a business around. Yes, you'll be more productive in the short-term, but a business is more than just code and you will need to wear those hats too before you'll have enough understanding and resources to hire those out. At this point, I'm fairly certain your first hire should be someone to take the engineering load of…

Jane Street Capital's Yaron Minsky once said that contrary to popular belief hiring for OCaml developers was easier because the signal to noise ratio in the OCaml community is so much better than other, more approachable languages. He would send a job post to the OCaml mailing list, get 15 responses, interview 10 people, bring five onsite and ultimately hire three new people.

I don't have direct experience with this, but it makes sense in theory. PHP is an easy language to find developers for, but it's incredibly annoying to figure out how competent the developers you're interviewing in that ecosystem will be. But languages like Haskell and Scala have a (perceived or real) barrier to entry, so you typically have a higher median ability among developers in those languages.

Re: Advanced programming languages (2009)

#16
post #12

This post is very fortuitous for me. I've been looking to learn a functional language and I had more or less narrowed my options to Haskell, OCaml and Scala. I liked the breakdown between these languages and the resources. Can anyone who programs in Haskell or OCaml regularly tell me the current state of standard and third party library support? I'm very attracted to Scala because it has JVM support, which sounds fan…

If you're really interested in learning a language for itself, rather than using it for some practical goal, libraries that are "just" bindings to some other language with radically different semantics don't really count as a positive. They generally end up non-native and a real pain to try to write "language-A in language-B", unless someone has taken the time to write a native-idiom wrapper around them, which is pretty uncommon. So for educational purposes, I'd only look at the pure-Scala libraries rather than "the JVM ecosystem". Or, similarly for Haskell, Haskell still AFAIK does't have a great binding to native QT or GTK or any other really good desktop toolkit. There are bindings, but you're writing C in Haskell at that point, which is definitely a pain, and not a great way to learn the language.

If you want to do practical things with the language, by all means count the bindings as an asset. It's still better to have a foreign-library binding to some capability than no capability at all, and it's not hard to imagine that using another language for some reason, even with the cost of the foreign-idiom binding, is still net cost/benefit positive.

Re: Advanced programming languages (2009)

#18

For a real world project pick a suitable language that will not only help you to implement whatever you have to implement but also to maintain the project. Also you should be able to find other programmers knowing that language if you need to. Maybe even use the language you already know even if it is not the newest and hottest stuff. But for private or side projects use whatever enlightens you. Those projects should…

Yes, that's exactly what I practice. My "breadwinner" language is C/Java/C++ at the moment because that is what others in the project know and that is what makes sense in the ecosystem the project is in, my sideproject language is Haskell.

Re: Advanced programming languages (2009)

#19

I'm really surprised that "Learn you a Haskell" is not in the Haskell resources list.

Not to knock LYAH, but I personally think it stops at a place that would leave newcomers a little ill-equipped to work on haskell projects, considering there are concepts (like monad transformers) that nearly every modern haskell project is going to make some use of that aren't covered. Pedagogically, I think its great that it takes some of the intimidation out of learning something that could otherwise seem very alien and academic.

These days, I recommend the book "Haskell Programming From First Principles" [1]. It's still a work in progress, but its already probably the best haskell book available right now. Just be aware that its a bit lengthy (1000+ pages) and that many of the chapters aren't necessary for learning haskell, but may make the going easier.

I also highly recommend using Stephen Diehl's "What I Wish I Knew When Learning Haskell"[2] which covers a huge amount of pragmatic advice on style, library use, GHC extension use, etc.

[1] http://haskellbook.com

[2] http://dev.stephendiehl.com/hask/

Re: Advanced programming languages (2009)

#20
post #12

This post is very fortuitous for me. I've been looking to learn a functional language and I had more or less narrowed my options to Haskell, OCaml and Scala. I liked the breakdown between these languages and the resources. Can anyone who programs in Haskell or OCaml regularly tell me the current state of standard and third party library support? I'm very attracted to Scala because it has JVM support, which sounds fan…

Answering your second question:

Since you have experience with a statically typed language, you'll be fine with little no to Java knowledge.

Post reply on HN