News for hackers. Stuff that matters.
Re:Haskell Researchers Announce Discovery of Industry Progra... by eru on Wednesday December 01, 2010 @08:51PM (#1960642)
> completely different from 'other languages'.

It's not too different from OCaml or Clean. (Though, I do miss type classes in them.)

Re:Haskell Researchers Announce Discovery of Industry Progra... by kwantam on Wednesday December 01, 2010 @10:14PM (#1960844)
Also, Standard ML. I learned Standard ML and created a couple toy systems in it before becoming utterly frustrated with the insane state of the "standard" library[1] and fleeing to Haskell. I briefly considered OCaml, but of the MLish languages it seemed to me that OCaml had the ugliest syntax, so I chose Haskell instead. Dumb reason to choose a language, probably, but I absolutely adore Haskell.

...and I have spent an entire weekend trying to figure out how to describe within Haskell's type system something that is trivial in scheme[2] !

[1] In particular, there's a lot that's not in the SML spec that most people want in a stdlib, and every compiler's implementation is quite different. This means once you decide to use SML/NJ, if someone else has written a library you need, but for MLton, you're just up the creek. Perhaps this also happens with resp. GHC and Hugs, but I haven't found it to be nearly as much of a problem.

[2] If you care: can I create a function that takes as its arguments another function and a list, and applies the elements of the list as arguments to the function? E.g., listApply (+) [1,2] should return 3. In scheme, assuming that you already have curried functions, this is trivial. In Haskell, it's exceedingly difficult. Consider: the approach in scheme, iterative partial applications, absolutely won't work in Haskell, since the types won't match: (+) has type (Num t) => t -> t -> t, but (+1) is (Num t) => t -> t.

It turns out it's possible either with explicit isorecursive types (and some lifting functions) or using Template Haskell. For posterity, I posted both solutions on this old StackOverflow question I found when looking at how others had handled the same problem (viz., they hadn't, generally):

http://stackoverflow.com/questions/3775446/passing-list-elem...

Re:Haskell Researchers Announce Discovery of Industry Progra... by eru on Thursday December 02, 2010 @06:14AM (#1961772)
I also love Haskell's syntax. It's very tasteful in most choices. Although my opinion of Python has gone down over the last few years, I still like its syntax, too. Especially the significant indentation, but I believe that Haskell has the slightly better mechanism, by defining indentation as a syntax sugar that you can avoid, if you want to.

OCaml's standard library is also quite dismal. At the recent meeting of the OCaml consortium in Paris we suggested creating a new extended standard library. (We will reuse Core and Batteries et al, of course.)

A co-worker and I are in the procss of writing a regular expression module that doesn't suck. It will be threadsafe and use poor OCaml---the module from the standard library calls C-code to run a backtracking bytecode interpreter with lots of mutable state.