[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: another hat in the ring regarding Lua 5.2: static typing
- From: nr@... (Norman Ramsey)
- Date: Tue, 26 Feb 2008 14:05:42 -0500 (EST)
I dream of one day being able to do static type inference
on my Lua programs, thereby catching innumerable silly errors.
I worked on this problem one summer with Inna Zakharevich, and
it's not clear that we will ever get anywhere, but I would
dearly love it if Lua 5.2 contained some syntactic hooks
that could be used to write down type definitions and
to write down the types of some variables. Since we have
no idea what we want, I'd simply ask for a syntax
typedecl string-literal
which the current compiler would ignore.
I realize the same effect could be achieved at present by simple
function typedecl() end
but (a) that would have a small run-time cost and (b) I'm really
asking the Lua team to pick a keyword and reserve it for future use.
Norman