> Kristján Valur Jónsson wrote: >> I've never understood the need to have a distinction betwen statements >> and expressions, not when expressions can have side effects. Alex Martelli responded: > If you're interested in understanding it better, research > Query-Command Separation (QCS), e.g. starting at > http://en.wikipedia.org/wiki/Command-query_separation Either you missed Kristján's point, or your answer was so subtle that I missed yours. QCS makes it easy to determine which pieces of code (queries) are free of side-effects. I see value in that for both debugging and optimization. What I don't see is how that relates to expressions vs statements **when expressions can have side effects.** (Actually, in Python, I would say that statements are far *more* likely to be free of side-effects, as they are often there for flow control.) -jJ
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4