4 ms·
Being forced to re-design code written with the wrong assumptions doesn't qualify as proof that (purely) functional programming "doesn't work".
by Deestan 17y ago
Being forced to re-design code written with the wrong assumptions doesn't qualify as proof that (purely) functional programming "doesn't work".
- cousin_it 17y agoAlmost all code is initially written with the wrong assumptions.
- Deestan 17y agoAnd it should(+) always be refactored to match the new assumptions in a meaningful way. I get your point, I just meant that "doesn't work" is quite a stretch from "doesn't allow ugly global variable hacks". (+) http://xml.resource.org/public/rfc/html/rfc2119.html#anchor3 http://xml.resource.org/public/rfc/html/rfc2119.html#anchor3
- bad_user 17y agoSince when are global variables ugly hacks?
- foldr 17y agoIf there is information that needs to be accessible across several not-otherwise-very-interdependent modules of a program, then you need to have something with essentially all the properties of a global variable. That doesn't' necessarily mean that you need a single identifier with global scope, but it does mean that you need something with essentially the same properties.
- ajuc 17y agoFor me this example is "for functional programming", not againist it - I mean, since when ease of using global variables is adventage ? You end with code that is hard to reason about. For me it's good, that making the code complicated to understand is hard.