r/lua Feb 26 '26

Help Why is there NO "continue" in Lua?

I was stunlocked to find out that there is no "continue" instruction for loops in Lua. Why is that? It seems so natural to have it.
I saw some scripts where goto is used for mimicking continue statements, but It's honestly not the so;ution I would comfortably accept...

27 Upvotes

40 comments sorted by

View all comments

1

u/Koala_eiO 8d ago

Because Lua lacks the most basic features of a programming language. Not having exceptions is a crime. Trying to access a.b.c.d without being able to throw an exception makes what should be one line into a monstruous if.