lua-users home
lua-l archive

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


I'd love to see Lua have something like Typescript.  I wrote the Haxe target for Lua, but they're fairly different syntactically (echoing the situation for Haxe and _javascript_).  Still, it's nice using some of the Haxe ecosystem libraries for Lua now.

Having a compiler in the loop can catch simple errors, reduce generated filesize, and help gloss over differences in Lua versions.  However, I think special care must be taken to make it fast to compile.  I think typescript lacks a bit in this regard, especially for larger projects (which is where typescript *should* shine).  I'd strongly recommend OCaml for writing a typescript-like compiler for Lua.  It's what we used for Haxe, and as a result it's fantastically fast.

The wild thing about Lua is that it keeps finding itself in the middle of new and exciting tech... whether it's machine learning in Torch, or super fast web frameworks with nginx.  The folks coming to Lua from those domains have very different expectations and experiences than folks doing embedded or game scripting.  It's up to the Lua community to decide if it embraces those communities, or if it sticks to its original culture.

 

On Fri, Mar 16, 2018 at 9:42 AM, <tobias@justdreams.de> wrote:

Quoting Keith Nicholas <keith.nicholas@gmail.com>:

you don't realize why _javascript_ is popular? Ok :)   But that's a tangent
anyways.

People have forever criticized js for it's lack of type safety and squishy
syntax.

The thing that's made js way better to deal with is the tooling.   But even
then, there is a large rise in things like typescript and other transpiled
languages.  People are super motivated to do js because of  the web and has
driven large innovations around frameworks.

I think one of the shortcomings of the stackoverflow survey is that it focuses
predominantly on developers more so than on tangentially effected groups such
as devOps.  In my experience the simpler an ecosystem is, such as Lua, the
easier it is to deploy.  TypeScript is a nice language that deals with the
plethora of shortcomings of JS in a nice way, but the transpliler infrastructure,
requiring properly setup map files etc... all this makes the debugging of errors
in production environments a massive PITA.  What I'm saying, if you include
more than a developer opinion in the ranking the playing field would be scrambled
up pretty good.

 -tobbik