Hacker News new | ask | show | jobs
by kccqzy 2952 days ago
There are more ways to define semantics for formal languages than you suggested. What you described seemed to be mostly operational semantics where each term (or statement) ultimately causes some memory to be referenced or changed or an operation carried out. It is quite possible to define the semantics denotationally where each term (or statement) simply becomes an element in a domain. Its ultimate meaning can change depending on which domain you are using.
1 comments

Good point. I'd never heard of denotational semantics before. I'm coming from a more or less naive perspective of trying to pinpoint where the ambiguity is that you have to wrestle with in different kinds of languages. In formal languages, the classic problem is, what you say is not what you mean. In natural languages, the classic problem is, what you mean is not what really exists. So for the latter, we have the whole development of science, epistemology, empiricism etc.

For the former, we have the whole notion of semantics, the development of tools like valgrind, tests, etc.

Is there anything you can reccomend to read? I'm pretty familiar with how computers work on a mechanical level, but I'm pretty ignorant about the theoretical intuitions behind all the more functional stuff.