I was looking for something to help me understand strict evaluation in purescript, coming from being so used to lazy Haskell. I came across “the difference is complexity”, published in the past few days.
Firstly, I hate articles pitching language A “vs.” language B. It’s never that simple.
Then I read a load of meaningless gibberish “about” Haskell. To pick a few:
- “calculate types” – we usually say “infer” or “solve” types, because the compiler needs to figure out the types of every expression at compile time. But then every strongly-typed language does that, including (presumably) purescript. Why’s that in the same breath as “execute operations”?
- " write control structures like if-then-else" did the dude actually read the comments at the link? In procedural languages if-then-else is a control structure; in Haskell it’s an expression. [Actually ALGOL has both if-then-optional-else as a control structure and if-then-else as an expression structure.]
- " in Haskell, data structures are immutable by default." errm always immutable from the end-user-programmer’s in-programme point of view. There are packages that behind-the-scenes mutate the in-memory structure; but for an intro article this is too much detail which is then not explained.
- " programming operations in Haskell often relies on sophisticated levels of functional thinking and mathematics, …" well the dude’s entitled to a point of view; but goes on to contrast purescript … doesn’t rely on functional thinking? … isn’t sophisticated?
- “The language exposes many underlying details that would otherwise remain hidden from most developers as abstracted library implementation code.” Huh? The purpose of library code is exactly to abstract away implementation detail. How does Haskell “expose … underlying details”? And again, why’s it any different to purescript?
I’d describe that last paragraph before turning to purescript as meaningless word-salad.
- " PureScript offers straightforward installation and build processes, … easy to refactor, debug and test" so … Haskell’s isn’t so straightforward?
- (skipping over the bit about record systems)
- “PureScript also uses a rich type system to downplay some of the complexities associated with functional programming, such as overly verbose code or a lack of abstraction capabilities.” Haskell’s type system isn’t so rich? What complexities in FP does Haskell leave exposed that purescript doesn’t? “overly verbose code”? – contrast earlier “Haskell … features a concise syntax”.
Who is this ‘Kerry Doyle, Analyst’? A journo who’s just repeating purescript ra-ra?