3 ms·
Why do you assume that one can't assign a semantics to code that happens to be included within the program as a runtime construct? Such semantics might even be
by zozbot234 4y ago
Why do you assume that one can't assign a semantics to code that happens to be included within the program as a runtime construct? Such semantics might even be "compile-time" checked in a conventional way, if one can come up with a machine-checked proof that the runtime treatment of such "constructs" does preserve whatever semantics one cares about. Of course this runs into concerns with Turing-completeness in the fully general case, but for many practical scenarios such a check might well be feasible.
- mannykannot 4y agoI'm not saying you cannot do that (and, specifically, I am not saying you cannot do the sort of things the author seems to want to do.) I am saying that I don't see how you can write the program in the first place, unless you have some semantics in mind for every identifier you introduce. To add to that, I doubt to can perform a runtime substitution unless the substitution conforms to the semantics of the original design. This seems to be the case with the author's examples, which extend the original types with a sidechannel for getting information about the execution of the program.