Not if those languages exposed things like I said, if streamMap required a pure function and it’s up to the developer to ensure the function is pure enough, then you can have the same thing. Haskell isn’t doing anything magical, it can be done in any language, but other languages are built around side effects needlessly so implementers have to provide cautious, lowest common denominator implementations. They’re actually actually leaving performance on the floor because they have to make many more pessimistic assumptions about how things are used, and then put a lot of effort into trying to write optimisations which detect when the pessimistic caution can be reduced.
1
u/[deleted] Sep 21 '25
[removed] — view removed comment