4 ms·
When expression is not pure value -- they also can be control structures -- the arguments for "everything is an expression" is being defeated, right? A control
by hzhou321 7y ago
When expression is not pure value -- they also can be control structures -- the arguments for "everything is an expression" is being defeated, right? A control structure is for defining the path -- control flow. The values in a control structure is a side effect just as the control-flow is a side effect in an expression language. When control flow is the center of logic, won't a control-flow oriented language -- imperative programming -- be more straight forward?
In your example, after you started the engine, don't you still need `start-rocket`? The bug sneaks in due to discrepancy that while the syntax is all about values, the semantics is all about flows.
- lispm 7y agoIt gives us as a developer the freedom to decide: do I want control flow, return values or both?