News for hackers. Stuff that matters.
Re:Why Haskell? by yakshaving_jgt on Saturday September 14, 2024 @03:35PM (#41542229)
But now you’re talking about something else aren’t you? Now you’re talking about generalising. You can generalise, for example, from Float to Floating a => a. But I don’t understand how the original Int to Maybe Int change could be sensible. How does that work?
Re:Why Haskell? by magicalhippo on Saturday September 14, 2024 @09:00PM (#41544307)
The exact same way? Or perhaps you could tell me, in which cases can an Int not be turned into a Maybe Int?

Again, I don't know Haskell, so from the outside it looks like much the same as the float -> complex conversion.

Re:Why Haskell? by yakshaving_jgt on Sunday September 15, 2024 @12:17PM (#41548359)
It sounds like you need to learn about parametricity.

https://www.well-typed.com/blog/2015/05/parametricity/

Re:Why Haskell? by cubefox on Monday September 16, 2024 @04:03AM (#41553826)
It doesn't sound like that to me. Could you not just answer his question?
Re:Why Haskell? by yakshaving_jgt on Monday September 16, 2024 @04:08AM (#41553856)
To whom shall I send the invoice?