lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


2013/3/27 Tim Hill <drtimhill@gmail.com>:
> My point was that, at a certain abstract level, semantic bugs are mostly in the eye of the beholder. Attempts to formalize semantics almost always end up creating formalisms that shift semantics back into the realm of syntax; that is a formal logic system that while self-consistent doesn't really say much about anything other than that the symbol chain is valid within that system. Attempts to go beyond that fail in the same way silly ideas like the "semantic web" nonsense of a few years back.

I think that's actually a smart realization that I wish some of my
professors would make. What we consider semantics is mostly something
tied to the human mind, and it can't often be formalized with these
clean, simple mathematical symbols. However, just because maths can't
do it elegantly, it doesn't mean programming languages and computers
can't do it with all the raw power at their disposal.

The lua VM is a definition of lua's semantics. It's not just a
formalism, it's a program. It actually carries semantics, and even if
we are arrogant enough to pretend that the VM is meaningless without
humans writing programs for it, we can't get around the fact that even
with humans gone, a lua VM can translate a program into real world
actions - give it meaning, semantics.

What programs lack is self-awareness, and the resulting "smart"
self-manipulation(yes, there are programs that manipulate themselves,
but I don't know of one that smartly evolves that way). They do have
semantics, though.