News for hackers. Stuff that matters.
Re:Who Needs Haskell? Straight to Rust Hell by jesserwright on Friday January 06, 2023 @04:21PM (#34281299)
There's something beautiful about function composition. Great to see it in another language (me coming from JavaScript).
Re:Who Needs Haskell? Straight to Rust Hell by scaredginger on Friday January 06, 2023 @10:33PM (#34284868)
To be honest, I'd struggle to think of a language with generics or dynamic typing where you couldn't do function composition.

Even in C, you could do something like in this godbolt link (ugly, I know):

https://godbolt.org/z/aKTz6fdbc

Re:Who Needs Haskell? Straight to Rust Hell by spoiler on Saturday January 07, 2023 @12:27PM (#34290304)
That's not quite the same (functionally) as the Rust solution though? Unless you meant to just illustrate a minimal PoC, in that case I suppose it does the job. More importantly (IMO) Rust allows us to be truly generic without sacrificing any type safety in the process.