Luau Type Checking Beta!

What makes adding continue as keyword different from adding type as a keyword? type already is a variable, it has a value and can be reassigned and just used as a variable, but now it’s also a keyword. continue is already sometimes used as a variable, but I think any context where it is intended as a keyword is uniquely distinguishable from any context from where it is intended as a variable. e.g.

for i = 0, 1 do
	if i == 0 then
		continue
	end
end

this makes no sense if continue is not treated as a keyword, just like continue = true makes no sense if it is.
this makes sense:

for i = 1, 10 do
	local continue = i%2 == 0
	if continue then
		continue
	end
end
7 Likes