Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I will definitely give it a try.

Even after many years of not using terralang I still cannot forget what a good of an idea it is.

Nelua seems like a more pragmatic implementation of similar ideas, but generates C code instead of embedding the llvm. And doesn't generate code at runtime. But still, things like ecotypes should be possible.

It will be interesting to play with the compile time lua scripting. Also, as mentioned in the other comments not sure about the GC. But there seems to be a manual memory management option.

But still, looks great, kudos to the author, keep up the great work.

PS: If I would implemented it, I would deviate a bit from Lua and replace local with let. It's highly subjective but I think it would make code "prettier"(whatever that means)



> PS: If I would implemented it, I would deviate a bit from Lua and replace local with let. It's highly subjective but I think it would make code "prettier"(whatever that means)

The idea behind it is to have the lowest syntax barrier possible for Lua developers so they can migrate from Lua to Nelua without a sweat.


Yep, it makes sense.

With the popularity of Roblox with the young people, and it using Lua for scripting, Lua can see a renaissance of some sorts.


Could you macro up an alias if you wanted to?


You could change the language grammar through the preprocessor to accept "let" as an alias for "local". But I recommend people get used to Lua syntax because the metaprogramming will be done in Lua anyway, thus both programming and metaprogramming contexts have similar syntax.


As long as we're bikeshedding, I've often thought that Lua should warm up to using `my` as a keyword in place of `local`. `let` doesn't convey that it's a scope keyword (LISP heritage notwithstanding), while `local` is long and `loc` is an eyesore.


Eyesore is a precise word for the local keyword, from what I see the variable names in scripts are usually short, and the local keyword seems to draw more attention than the variable names themselves.

Of course this can be alleviated with syntax highlighting that would slightly mute the local keyword. And, people using Lua they day probably learn to ignore the keyword automatically.


By ecotypes i meant exotypes(see https://cs.stanford.edu/~zdevito/pldi083-devito.pdf)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: