|
|
|
|
|
by NovemberWhiskey
1960 days ago
|
|
In my experience (which is quite dated at this point; my Haskell usage is back to the turn of the millennium), the usual approach was pattern matching. i.e. if you knew you were going to use a function that might not be defined you would write an alternate case. The type system isn't helping you at all there. The feeling I had was that much of the prelude stuff was there to provide for beautiful, terse examples of functional programming and less to protect a software engineer. |
|
I've just started my Haskell journey and the undefined paths through partial function implementation caught me by surprise.
Just skimming Wikipedia it looks like I would want to use "total/strong functional programming" but apparently "total functional programming is not Turing-complete"
https://en.wikipedia.org/wiki/Total_functional_programming
Also found this on the Haskell site after some more googling:
https://wiki.haskell.org/Partial_functions