4 ms·
Has there been any exploration into an idea where the problem with side effects is not that they make functions impure, but they are often against the metaphor
by argv_empty 13y ago
Has there been any exploration into an idea where the problem with side effects is not that they make functions impure, but they are often against the metaphor of the instructions being given?
There are lots of posts on blogs, newsgroups, etc. about the aesthetic value of having one's code be math-like, but the working programmer doesn't necessarily care about that. That programmer probably does care about avoiding spooky action at a distance. Conforming to a "traditional math is [beautiful|divine|the true Dao]" ideology does not matter to that programmer as much as knowing what data a function depends on or affects.
- taeric 13y agoRight, this is essentially my question. Most of these posts start with the assumed position that one's code should be "math like." At least, that is how it seems to me. Yet we often find ourselves working with items such as a DOM which are far removed from how many of us think about "math like" items. My question is essentially have there been any approachable explorations of this topic? In my case, at least, preferably not starting from the perspective of category theory. :)
- argv_empty 13y agoWhich is your question? "Why is this useful?" or "How do I use this with something like the DOM?" or both or something else?
- taeric 13y agoMy question is if there are explorations of where "the aesthetic value of having one's code be math-like" is explored at a more objective level. Aesthetics are nice, but they do little to explore the ultimate goal of getting things done. I confess I really like the exploration in SICP of the value and place of imperative programming versus declarative programming. I do think there is a space for both, but I worry at the gymnastics we go through to never mix our metaphor away from "equation like" and over to "directions like."
- argv_empty 13y agoAesthetics is really not my area, so I don't know how aesthetic claims are generally evaluated in a formal or objective way. If the ultimate goal is getting things done, I would suggest ignoring the aesthetics talk.
- taeric 13y agoRight, but most of the posts seem to focus on the aesthetics talk. Where are the ones that delve into more objective or even empirical results?