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

This is a good start, but there's also some deeper ideas in Lua. It has a good implementation of coroutines, for example; if you're familiar with continuations from Scheme, they fit most of the same uses. (They're like generators from Python or fibers from Ruby, but with less edge cases.)

The C interop is also a Big Deal. Lua seems like a cute little language, like a cleaner Javascript, but it's a LOT more useful if you're also proficient in C. Also, Lua will run anywhere you have an ANSI C compiler and a modest amount of space.



Coroutines are tricky, and you need to explain them, not just present a bit of code. I think it is the right decision to omit them from a 15-minute intro. The C API is way out of scope.

I would cover assert() statements and the common (exit_status, result) var return, since that is so idiomatic. Maybe also loading chunks.


I agree, they're tricky. I'm currently working on a blog post about them. :)




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: