Live data from Hacker News

Why Haskell Is Worth Learning

spin.atomicobject.com

91–100 of 114 posts

Re: Why Haskell Is Worth Learning

#91
post #79

Earlier quoted context omitted.

I understand F# is in the ocaml family. Any reason why one would prefer ocaml over fsharp?

There are several reasons why one would prefer OCaml over F#: - OCaml is not tied to .NET. Obviously the converse also applies: if you need .NET integration then F# might be a better choice. - F# does not support some of the more advanced features of the OCaml type system, like polymorphic variants (open unions) and functors. These are very useful OCaml features, IMHO. - OCaml has gained some very interesting feature…

A few counterpoints in favor of F#:

- Even if your project doesn't need .NET integration, it's nice to have all of the .NET libraries (built-in or otherwise) at your disposal. OCaml also has some nice libraries, but nowhere near what .NET (or Java, for Scala) has -- so it's likely you'll have to implement your own library for some task if it's outside of the mainstream.

- F# has also gained some interesting features since it's branched away from OCaml -- computation expressions (syntactic sugar for monads) and type providers (automatically-generated, strongly-typed interfaces to databases, JSON APIs, etc.), for example.

- .NET has a mature and very fast garbage collector tuned for real world usage (e.g., people running C#/ASP.NET on large webservers). This hugely benefits F#'s performance.

- You can use Visual Studio or MonoDevelop to write and debug F# apps, which makes it much nicer to use in practice. (Oh, and you can get Visual Studio Express for Web if you want to use VS and F# for free.)

I don't have anything against OCaml, I just wanted to point out that F# certainly deserves consideration if you want to learn a new language (i.e., it's not a knock-off version of OCaml).

Re: Why Haskell Is Worth Learning

#92
I'm at the point where I have zero interest in learning new languages to "expand my mind" unless they have very obvious application to problems I am facing right now. For example, Matlab sucks, and scientific computing sucks in most other languages, so learning Julia is probably worth my time. What is Haskell's killer domain? Meta-programming C code seems more than a little esoteric for it to be worth the massive investment of time and opportunity cost of curling up with a Haskell book and a REPL in my free time. I spent a lot of time learning Clojure, which is an amazing language, but here I am years later and I still reach into my toolbox of imperative languages (C, Ruby, Matlab, Java) to solve any "real" problems quickly, efficiently, and in the most straightforward (and understandable by mere mortals) way.

If I want to expand my mind (towards the end of building software) I will fire up Coursera and study math or algorithms, things which are, imho, more widely applicable, timeless, and have a "bigger bang for the buck" for self-study than learning another programming language.

Re: Why Haskell Is Worth Learning

#93
post #29
post #25

I have to admit that I'm really on the fence about Haskell. My major gripe with this point I think is point (3). Haskell has (IMHO) gone down a similar road to Scala. Scala has literally tied itself into knots to make statically typesafe collections (amongst other things). I see parallels with Haskell (maintaining functionality purity but dealing with the "outside world" through monads). I'm not saying this is wrong.…

Haskell is also very simple--not from an implementation standpoint but from a semantics standpoint. Having polymorphism with no sub-typing (and no casting) is conceptually simple and easy to work with. Parametric polymorphism (like Java's generics but simpler and less horrible) is actually an extremely simple concept. The difficulty comes from a) implementing it in a stupid way after the fact ( cough Java) or b) havi…

Here's my challenge, echoing a comment further down: If you want to convert folks to Haskell, write something useful in it. Then people might actually be interested in learning more about it. That's the only way you'll get converts, not writing boring, condescending lectures. My programming language prof tried to use the entire course to indoctrinate students in Haskell. He failed. None of his ramblings about how "pure" Mondads or such and such was or any of his homework assignments ever convinced us that Haskell was a better way. I don't expect you to get much further. For me, the rub was that he never showed a real world application. I took that as proof that the whole language is asinine, and that the claim that it gets rid of the dreaded "state" was bs. Another thing that always irked me: pretending that mathematics has nothing to say about "state". That's pretty funny coming from Haskell fans, who like to fancy themselves mathematicians.

Re: Why Haskell Is Worth Learning

#94

Earlier quoted context omitted.

>It is an issue of the language's qualities if it does not really make it easier to reason about code. The primary point of haskell is making it easier to reason about your code. >I find reason to question the simplicity of something which is widely acknowledged to take a lot of time to learn, to be mind-bending, and which seems to be impossible to explain simply It takes a long time to learn any programming language…

The tiobe index has lisp in the top 20 (at 13th) while Haskell is at 33rd, so lisp is more popular than Haskell even though lisp is over a half century old. Being in the top twenty after 50 years looks like the very definition of "survivor" to me.

Lisp isn't a language, it is a whole bunch of languages. Lumping half a dozen languages together obviously moves it up the list. Being old is working in its favour, not against it. Older languages have more written about them purely because of the time they've existed. Pick a specific lisp and try your comparison again.

Re: Why Haskell Is Worth Learning

#95
post #92

I'm at the point where I have zero interest in learning new languages to "expand my mind" unless they have very obvious application to problems I am facing right now. For example, Matlab sucks, and scientific computing sucks in most other languages, so learning Julia is probably worth my time. What is Haskell's killer domain? Meta-programming C code seems more than a little esoteric for it to be worth the massive inv…

Algebras? I learned some basic Haskell: the type system and algebraic data types.

When I went to study group theory, I found it came easily. Now I'm working my way towards lie algebra. The cool thing about Haskell is for any particular algebra, there's often a good tutorial or literate Haskell implementation. Picking the right algebra for the problem domain can save you a lot of computation, but once you understand how it works you're always free to drop back to an imperative language to do the computation. Haskell makes it easy to play around and discover deep relationships, but it does require being an a mind-expanding mood to get to a comfortable place.

Re: Why Haskell Is Worth Learning

#96
post #29

Earlier quoted context omitted.

Haskell is also very simple--not from an implementation standpoint but from a semantics standpoint. Having polymorphism with no sub-typing (and no casting) is conceptually simple and easy to work with. Parametric polymorphism (like Java's generics but simpler and less horrible) is actually an extremely simple concept. The difficulty comes from a) implementing it in a stupid way after the fact ( cough Java) or b) havi…

Here's my challenge, echoing a comment further down: If you want to convert folks to Haskell, write something useful in it. Then people might actually be interested in learning more about it. That's the only way you'll get converts, not writing boring, condescending lectures. My programming language prof tried to use the entire course to indoctrinate students in Haskell. He failed. None of his ramblings about how "pu…

There's plenty of useful software written in haskell. Why is this particular nonsense so commonly repeated with haskell? Just because you don't bother looking at the software written in haskell, doesn't mean it doesn't exist.

Re: Why Haskell Is Worth Learning

#97
post #88
post #29

Earlier quoted context omitted.

Haskell is also very simple--not from an implementation standpoint but from a semantics standpoint. Having polymorphism with no sub-typing (and no casting) is conceptually simple and easy to work with. Parametric polymorphism (like Java's generics but simpler and less horrible) is actually an extremely simple concept. The difficulty comes from a) implementing it in a stupid way after the fact ( cough Java) or b) havi…

> You can fit Haskell's evaluation rules and its typing rules on one page. Evaluation rules yes, but typing rules? Once you add in features like records, GADTs, type classes, functional dependencies, type functions, equality constraints, associated types ... you end up with quite a complicated system. Maybe you can state it on less than a page if you use a small enough font, but the system is complex. In contrast, C…

Actually, your examples serve to counter your argument. All of the things you mentioned are very simple, and are in fact implemented in terms of the core language semantics. They are also non-standard extensions, not part of haskell. You do not need to know them or use them at all.

Your final part is just plain nonsense. That is like claiming C is complex because you need to learn things like hash tables and linked lists and binary trees.

Re: Why Haskell Is Worth Learning

#98
post #29

Earlier quoted context omitted.

Haskell is also very simple--not from an implementation standpoint but from a semantics standpoint. Having polymorphism with no sub-typing (and no casting) is conceptually simple and easy to work with. Parametric polymorphism (like Java's generics but simpler and less horrible) is actually an extremely simple concept. The difficulty comes from a) implementing it in a stupid way after the fact ( cough Java) or b) havi…

Here's my challenge, echoing a comment further down: If you want to convert folks to Haskell, write something useful in it. Then people might actually be interested in learning more about it. That's the only way you'll get converts, not writing boring, condescending lectures. My programming language prof tried to use the entire course to indoctrinate students in Haskell. He failed. None of his ramblings about how "pu…

Just browse hackage. http://hackage.haskell.org/package/simpleirc is a good starter.

Re: Why Haskell Is Worth Learning

#99
post #25

I have to admit that I'm really on the fence about Haskell. My major gripe with this point I think is point (3). Haskell has (IMHO) gone down a similar road to Scala. Scala has literally tied itself into knots to make statically typesafe collections (amongst other things). I see parallels with Haskell (maintaining functionality purity but dealing with the "outside world" through monads). I'm not saying this is wrong.…

I don't think simplicity is as much of a recipe for language popularity as you claim. Scheme is a very simple language, far simpler than any of the languages you mentioned, yet it doesn't get much use in industry. Standard ML is a simple language, simple enough to be formally specified even. Most computer science students easily pick it up and learn it as part of a compilers course, so it's not that the language is s…

PHP C and C++ are popular because they are imperative languages. For non mathematicians , "imperativism" is far more easier to grasp than functional , closures , first order, monads , ...

it is easy to understand what a IF statement does , what a FOR loop is , and a basic PROCEDURE or FUNCTION is.

It is not easy at all to think in terms of pure functions , immutability , etc ... because you need to actually design you code before writting it.

I dont think Haskell is hard because of the syntax , it is hard because it is a functional language.

Re: Why Haskell Is Worth Learning

#100

I love haskell but I wish there was less blogging about why everyone else should use it and more building things that will make people want to use it. The community is extraordinarily friendly to beginners, as long as you only count how they interact with beginners. If you count having resources that allow beginners to figure something out without having to ask then they are extraordinarily unfriendly. If I find a po…

Why does this crap always get posted, and always manage to float instead of being downvoted? You know what other programming language community blogs about their language and tools? ALL OF THEM. Why do people suddenly insist it is a problem that haskell users do the same things everyone else does?

If every time something about ruby showed up on HN someone piped up to say "stop talking about ruby and actually build things people want" they would be rightly downvoted to shit.

The rest of your post is the same sort of nonsense. Some open source code has no documentation?! What a shocker, I'm sure no other programming language has ever had any undocumented modules released in it before. The bitching about iteratees is particularly disingenuous. You don't need to use any of the competing solutions, other languages have no similar library at all, and the entire thing is very new. "Hurry up and standardize your cutting edge libraries that you just wrote and are still exploring" is both insulting and stupid.

Post reply on HN