3 ms·
I can't comment on Lisp, but I've been working with Haskell for about a year or so now, so I'll cover that instead. My personal history goes something like QBa
by FalconNL 17y ago
I can't comment on Lisp, but I've been working with Haskell for about a year or so now, so I'll cover that instead.
My personal history goes something like QBasic -> Visual Basic -> PHP -> Java -> C# -> Haskell.
Since Haskell is a purely functional language there's no cheating like you could in, say, OCaml. This forces you to learn how to work with immutability, which I have become a big fan of. When working with C# I try to avoid mutability as much as possible (naturally this is quite a bit uglier than in Haskell, but it does avoid some problems). Most of my C# projects now acquire a Haskell.cs file fairly quickly, containing things like a Tuple class, zip, >>=, etc.
In the time I've spent learning it, Haskell has quickly become my favourite language. It's not perfect (my current main wishes are existential types and an extensible record system), but it is considerably less painful than the other languages I know.
As for speeding up the transition, I can't offer anything other than just diving in. At some point it will just click and you will wonder what all the commotion is about (another monad tutorial? why?). Granted, I still don't have the slightest idea about why I would want to use a hylomorphism or what to do with a comonad, but perhaps I will some day. Fortunately you don't need them in everyday Haskell programming :)
- Zak 17y agoIf you're doing FP in C#, why not use F#? It's not Haskell, but it's a step closer.
- FalconNL 17y agoI've tried it a bit, but I found the syntax rather ugly compared to Haskell. I know, I'm nitpicking and it really shouldn't matter that much, but it put me off the language. Perhaps when they finally release a full-blown implementation of F# for Visual Studio I'll give it another go. My main reason for still using C# at the moment is the UI integration with WPF and Windows Forms. Ideally there'd be an actively maintained Haskell.NET, but perhaps F# can serve as a compromise when Visual Studio 2010 comes out.
- asimjalis 17y agoIs your Haskell.cs file published somewhere?
- FalconNL 17y agoNo, I mostly make a new one per project. All the functions are pretty much one-liners anyway, so it's not too much work to make. It's more of a documentation thing; anything in Haskell.cs can be assumed to work exactly the same as its Haskell equivalent.
- mightybyte 17y agoYou took the words right out of my mouth. I had a bit different language history, but I'm right with you on Haskell. I have always found that it's quickest to just dive in. It's kind of like learning natural languages by immersion...nothing works as fast as dumping yourself in a foreign country where you have no choice but to learn to communicate in their language. Reading some choice books and tutorials can certainly help, but there's really no substitute to writing code.