4 ms·
How would a strict language help? `0 * x = 0` doesn't hold if `x` is substituted by a non-terminating computation `f ()`. What exactly would be the benefit?
by tome 10y ago
How would a strict language help? `0 * x = 0` doesn't hold if `x` is substituted by a non-terminating computation `f ()`. What exactly would be the benefit?
- catnaroek 10y agoIn a strict language, non-terminating computations aren't values in the first place. So you can't substitute `x` with bottom.
- tome 10y agoI don't think I've grasped the distinction between substituting a variable of type t with a value of type t versus an expression of type t.
- catnaroek 10y agoThere's no such distinction. But, in the operational semantics of a call-by-value language, variables are only substituted with values. Or, to be consistent with the terminology I've used in other comments, in any language, a value is something a variable can be substituted with. It's just that, in a call-by-value language, variables can never be substituted with unfinished computations.