News for hackers. Stuff that matters.
Re:What i wish i knew when learning haskell by baldfat on Saturday April 29, 2017 @11:45AM (#14227073)
I tried to use Haskell three times. Cabal was the always the reason why I left. I use three different machines. 2 at two different locations at work and one at home. All three would be different and have different errors. I would spend hours and always left with a horrible taste in my mouth.

Today I use Racket and I won't go back but I am glad Stack is taking over Cabal.

Re:What i wish i knew when learning haskell by chongli on Saturday April 29, 2017 @12:21PM (#14227245)
The number one mistake they made was in deciding to make the package database stateful. Such an odd choice for a language so focused on purely functional programming. Packages should be pure functions, with the final result being a read-only cache. This is how Nix [0] works and it makes everything else seem like a bad idea by comparison.

[0] https://nixos.org/nix/

Re:What i wish i knew when learning haskell by danieldk on Saturday April 29, 2017 @12:12PM (#14227207)
Cabal was the always the reason why I left.

It is not only Cabal, but also the constant churn in a lot of packages. For example, conduit was a great package when I used Haskell. But usually I had to update quite a bit of code when I would bump conduit up to the latest version after not touching a program for a year.

Maybe I have been unlucky enough to use Haskell during some transitions (pre-arrows -> arrows rule, let's use them everywhere -> arrows suck, basic IO monad -> iteratees, old fashioned field access -> various lens proposals -> lens). But I never used a language ecosystem before or after where things would change or break so often.

Re:What i wish i knew when learning haskell by IngoBlechschmid on Saturday April 29, 2017 @12:41PM (#14227362)
Yes, there have been quite a few transitions happening. They didn't happen "for fun", but because it had been felt that the optimal solutions were not found yet (optimal as in elegant, easy to use, maintainable, ...).

Luckily, Haskell's static typing coupled with the extremely helpful error messages of the compiler makes refactoring a cheerful task: If it worked before and all type errors have been fixed, then we can be quite confident that it works again.

Many areas have stabilized now. For instance, Edward Kmett's lens package is the de facto standard for all things related to records, getters, setters, and all those things on steroids. (Personally, I love how this turned out. Before lens, we quite frankly had the problem that field accesses were much more painful than they are in mainstream object-oriented languages like Python or Java. Nowadays field accesses are as simple as they are in other languages, and in addition to this we have the flexibility of composable first-class lenses.)

Re:What i wish i knew when learning haskell by dllthomas on Saturday April 29, 2017 @01:11PM (#14227549)
> all type errors have been fixed

... by someone trying to actually address the issues. There are almost always wrong ways you can fix a type error. Fortunately, that's usually the situation at hand...

Re:What i wish i knew when learning haskell by WmyEE0UsWAwC2i on Saturday April 29, 2017 @01:30PM (#14227654)
I started using haskell before stack but after cabal sandboxes. Once I learned to use sandboxes cabal gave no problem.

I don't understand why it keeps receiving so much heat. What does stack do that cabal can't?

Re:What i wish i knew when learning haskell by dllthomas on Saturday April 29, 2017 @01:32PM (#14227675)
With sandboxes, I had little-to-no trouble developing individually on a single machine. I sometimes ran into issues trying to get the same thing building elsewhere.
Re:What i wish i knew when learning haskell by cauterize on Saturday April 29, 2017 @12:02PM (#14227165)
stack uses cabal underneath, but your point stills stands that cabal has been historically hard to use.