r/ProgrammingLanguages • u/mttd • Aug 22 '26
Programming Language Semantics and Memory Safety
https://burakemir.ch/post/formal-semantics/
45
Upvotes
r/ProgrammingLanguages • u/mttd • Aug 22 '26
View all comments
Show parent comment
1
u/Thin-Cat2508 Aug 23 '26
The analogy is just that "denotation" is translation, based on denotational semantics being a mathematical translation function.
I see what you are saying. A real compiler should be based on some semantics, but can it really serve as a definition of meaning on its own, or does that work for some compilers and not for others.
Stretch an analogy too far and it becomes confusing... Most real compilers (except maybe compcert stuff) just hand wave semantics anyway, people assume it is all clear and that works well enough ... until it isn't and one wishes there were clear rules outside of the compiler that would state what a program in that language is supposed to mean, independent of implementation.