lua-users home
lua-l archive

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


Excerpts from Mateusz Czaplinski's message of 2016-03-08 01:08:49 +0100:
> Those being external unofficial tools/projects has a whole lot of
> disadvantages vs. if it was an official part of the language. That's
> why I'm interested in them being part of the core, and that's
> specifically what I'm asking about. And also the existence of those
> projects (esp. Typed Lua, given its PUC roots) is why I'm even having
> any hopes for that and dare ask at all.
> 
> Also, as to the "non-goal" support voices: I explicitly mentioned an
> *optional* type system, which I'd imagine could hopefully be made
> perfectly backwards-compatible with the current approach? (as seems to
> be the case with e.g. the Typed Lua project, no?) So I genuinely don't
> really understand what's a problem here one would feel a need to "hope
> against"?

Given that typing on top of dynamic languages are usually used only for safety,
not performance there is little to no benefit adding it to core Lua when we are
talking about it's core niche - embeddability. Full blown type system would complicate
compiler a great deal, if we're talking about something proper and not just
mere syntactic sugar - doing type checks at parse time.

Lua offers very little in terms of code safety for a reason - it's much simpler to
implement it that way.

Such a project is simply better served as a separate recompiler targeting Lua.
It could easily surpass current Lua codebase in line count if you're wishing
for something robust enough to allow for large scale application development.

But you don't see people doing dedicated VMs for TypeScript either.
These tools are more akin to linter, and linter should be a separate tool.