5 ms·
Haskell: Programming is not enough like abstract algebra.
by dserban 13y ago
Haskell: Programming is not enough like abstract algebra.
- cabalamat 13y agoI've always thought of Haskell as a programming language for people who prefer maths to programming.
- jw2013 13y agoI think for the crowd you described, why not use Prolog? Prolog's idea is very much like what Math is to me (I only have a undergrad math degree, so don't count what I think is by any means absolutely correct)- here are some truth/axioms, can you deduce further theorems, and give result whether certain statements are true or false.
- nbouscal 13y agoAs far as I can tell, doing production work in Prolog would be an order of magnitude more difficult than doing production work in Haskell. This is just a guess, as I only have experience with the latter. This is similar to the reason we don't use Idris, Shen, and so on (yet!)
- maxiepoo 13y agoThe problem with Prolog is that to get reasonably performant code at all you have to understand the underlying unification algorithm and manipulate it using cuts to limit backtracking. This means that you have to break the core abstractions of the language in order to do anything, which defeats the purpose of logic programming. Functional programming in Haskell makes it fairly easy to write fast code, though Haskell in particular is tricky to reason about space-wise (due to laziness).
- jordigh 13y agoThis characterisation of Haskell bugs me a lot, because most reputable mathematicians would have nothing to do with Haskell either. The mathematical parts of Haskell seem to attract logicians, not general mathematicians. General mathematiicians much prefer Sage or Mathematica. Don't get me wrong, Haskell is a great language, but it's not very "mathematical". It just has terrible ambassadors that give the impression that category theory and Haskell are synonymous. They're not, Haskell has its own breed of categeory theory that I prefer to call Haskellory theory. This is a reasonable introduction to Haskell that does away with that Haskegorical nonsense: http://book.realworldhaskell.org/ http://book.realworldhaskell.org/
- copergi 13y ago>It just has terrible ambassadors that give the impression that category theory and Haskell are synonymous It isn't ambassadors doing that, it is detractors. >This is a reasonable introduction to Haskell that does away with that Haskegorical nonsense Note that one of the authors, Don Stewart is almost certainly the biggest haskell ambassador in the history of the language. Which reinforces my other statement quite nicely.
- cabalamat 13y ago> most reputable mathematicians would have nothing to do with Haskell either Really? Is that because they don't like Haskell, or because they don't like programming in general?
- jordigh 13y agoA little bit of both, but just because Haskell is so weird and different for most people, including most mathematicians.
- copergi 13y agoYou might think of it that way, but it doesn't reflect reality at all.
- Dewie 13y agoSeems like all the programmers who can't go a paragraph without mentioning the importance of "abstraction" got what they asked for.
- nbouscal 13y agoThere's abstraction and then there's abstraction. One of the benefits of Haskell is that it actually uses good abstractions rather than leaky ad-hoc ones. Making a Car an instance of Vehicle is not a good abstraction. Making a List an instance of Monoid is.
- tel 13y agoThen noting that List is isomorphic to the initial Monoid is great abstraction. When you know what that means you have leverage over a large number of valuable properties for both functionality and performance.
- seanmcdirmid 13y agoWait...how do I model my car in Haskell? Assume I'm writing a game with things on the screen that might be called objects. The FRP solution would be just to dump all the signals into a bunch of switches, no modeling at all basically. List is a nice collection if I'm using my built-in support for human language. I'd never call it as a monodic to my wife (or anybody else I care about).
- Dewie 13y agoIt seems that some people, while going on and on about 'abstractions' and the importance of it, really just want cute metaphors. As soon as they encounter abstractions from the 'premiere' field of abstract reasoning and concept, they're appelled.
- leoc 13y agoOriginally, it seems it was closer to Miranda: Lazy evaluation should be the default. Haskell: Miranda is closed-source. http://research.microsoft.com/en-us/um/people/simonpj/papers/history-of-haskell/history.pdf http://research.microsoft.com/en-us/um/people/simonpj/papers...