Live data from Hacker News

What I Wish I Knew When Learning Haskell

dev.stephendiehl.com

121–130 of 149 posts

Re: What I Wish I Knew When Learning Haskell

#121

Earlier quoted context omitted.

I learned Haskell and used it (and heavily functional Scala) professionally for about 6 years. I feel learning Haskell was worthless. It did not teach me anything about decomposing problems into function units, compositional sequences, pure functions / immutable data structures, lazy evaluation or asynchronous programming that I have found useful in modeling solutions to software problems. Guarantees from the compile…

Thank you. This is an important point that deserves to be discussed more. Would you mind sharing what business domain you were working in? I’ve seen static FP being used/popular in finance but not much elsewhere. Also, do you have a favourite language now?

Check out https://haskellcosm.com with list of companies by area.

Re: What I Wish I Knew When Learning Haskell

#122
post #87

Earlier quoted context omitted.

> Colleagues from outside the state (still!) often wonder how I can survive in a place like Austin, Texas, automatically assuming that Texas’s solid conservatism guarantees equally solid mediocrity. My usual answer is something like “Don’t worry. The CS Department is quite an enlightened place... Very Dijkstra to start by insulting the intended audience. Wonder if it had the intended effect?

I don't see the insult? He's saying that anyone who assumes that the CS program was mediocre is mistaken

One could interpret it as pointing out bias or ignorance. Considering the slightly condescending tone of the sentence it could be seen as an insult.

Re: What I Wish I Knew When Learning Haskell

#123

Earlier quoted context omitted.

>I feel learning Haskell was worthless. It did not teach me anything [..] Did you already know most of it from Scala?

I learned Haskell first, then Scala later for a job.

That's interesting. I reached a similar conclusion, but I entirely credit learning Haskell for getting there.

I thought I had some idea about controlling state and writing composable systems before, but I see now how rudimentary and flawed it was. Maybe you just got it quicker.

Re: What I Wish I Knew When Learning Haskell

#124

A few years ago I accidentally deleted my entire Haskell assignment about 1 day before it was due. Within a few hours I rebuilt it from scratch. That's when I realized the power of functional programming. There's no way I have been able to recover that quickly if I had used an imperative programming language. Since that experience I've tried to follow a functional programming style whenever I can. I've realized that…

But it was a programming assignment. Building a thing fast is, outside of very few situations, not a thing to optimize for. Building something to be maintained and evolved over time by non rockstars is far far more important, IMO. Perl is great for ripping through some script quickly but it has problems for long term maintenance.

Building a thing fast is absolutely something to optimise for in business.

Time is money.

Re: What I Wish I Knew When Learning Haskell

#125
post #114

If you're thinking of learning Haskell you should consider the software written in haskell as an indicator of, well, something. List all the programs useful for something other than programming a computer written in haskell: Xmonad window manager Git annexe Pandoc What else, let's get the full list. Exclude anything that we can't directly see or use. I say, yes! Learn Haskell! Just don't expect to write any useful pr…

Look at all these hundreds of companies who use Haskell to write apparently useless software.

https://haskellcosm.com/

Re: What I Wish I Knew When Learning Haskell

#126
post #95

Earlier quoted context omitted.

Performance. Internal representation. You are not actually modifying things in place. Those are the equivalent of linked lists not arrays. That quicksort is not quick at all because the append operation in Haskell is linear. You can't use those lists to implement quicksort.

“Modifying things in place” is, from the logical standpoint, an unnatural and even dangerous thing. A person that is not familiar with (imperative) programming often has a hard time understanding variables and assignments (similar to some programmers not understanding pointers). Mathematics doesn’t have assignments, either. That should tell you something...

It mostly tells me that mathematics does not care about runtime or space performance. Which is fine, because mathematics is about solving abstract problems, not getting a Turing machine to solve concrete problems.

Re: What I Wish I Knew When Learning Haskell

#128
post #2

Great timing. I was just pondering what functional programming language I should attempt to learn in all my new downtime.

I see a lot of people below saying to chose a functional language other than Haskell. As someone who's currently learning Haskell, I'm finding it _incredibly_ interesting...but I've heard that many of the free online resources don't lay the necessary foundation for learning the more advanced concepts. I'm 6 chapters into Haskell Programming from First Principles [0], and I highly recommend it. [0] https://haskellbook…

Haskell is definitely interesting, there is so much to explore and the community is eager

Re: What I Wish I Knew When Learning Haskell

#129

A few years ago I accidentally deleted my entire Haskell assignment about 1 day before it was due. Within a few hours I rebuilt it from scratch. That's when I realized the power of functional programming. There's no way I have been able to recover that quickly if I had used an imperative programming language. Since that experience I've tried to follow a functional programming style whenever I can. I've realized that…

But it was a programming assignment. Building a thing fast is, outside of very few situations, not a thing to optimize for. Building something to be maintained and evolved over time by non rockstars is far far more important, IMO. Perl is great for ripping through some script quickly but it has problems for long term maintenance.

Actually outside of a programming assignment, I think maintenance rather than speed is precisely why a company would want a functional code base.

How much time is wasted on debugging? Functional programming forces you to deal with your bugs at a much earlier point of development.

It also forces you to avoid some bad practices just to meet a deadline.

And since you're re-using so many component, you spend much less time with boiler plate code.

Re: What I Wish I Knew When Learning Haskell

#130
post #87

Earlier quoted context omitted.

> Colleagues from outside the state (still!) often wonder how I can survive in a place like Austin, Texas, automatically assuming that Texas’s solid conservatism guarantees equally solid mediocrity. My usual answer is something like “Don’t worry. The CS Department is quite an enlightened place... Very Dijkstra to start by insulting the intended audience. Wonder if it had the intended effect?

I don't see the insult? He's saying that anyone who assumes that the CS program was mediocre is mistaken

[deleted]
Post reply on HN