3 ms·
Order independence is not a property of general-purpose programming. As much as we'd love for that to go away, it is very much a reality of day-to-day programme
by lambdasquirrel 3y ago
Order independence is not a property of general-purpose programming. As much as we'd love for that to go away, it is very much a reality of day-to-day programmers.
- persnickety 3y agoThere's plenty of commutative operations in everyday programming. a = f(c) b = g(d) can be rearranged if f and g take different input data, and calling independent functions is something seen literally everywhere in programming. Optimizing compilers often take advantage of that.
- sriram_malhar 3y agoNot sure what you mean by it not being a property of general-purpose programming. Do you mean it as, "I don't have to account for it in my day-to-day work"? If so, I agree with you, but not quite in the way you mean (I think). We don't account for it just as fish don't have to account for water. The fact that you can swap two rows in an excel file and have the results be unchanged is a property that we just take for granted. It needs to be pointed out how remarkable it is, because there are situations where this doesn't work. Debits and credits in finance are not commutative because of overdraft limits. I'm sure you know all this, so I'm curious what you really mean.