Name: Anonymous 2011-09-30 22:32
For those of you demanding a reason Lua is shit,
consider the following code:
That is a fucking eyesore. The whole point of a while loop is to embed the exit condition in it. When you have to make an infinite loop and then use an if statement with a break to accomplish what you can normally do with something like:
that's when you need to stop using that language. Also why do if statements have "then"s? Any programming language that uses "then" is awful.
consider the following code:
local fh = io.open(filename, "r")
while true do
line = fh:read("*l")
if line == nil then break end
f(line)
endThat is a fucking eyesore. The whole point of a while loop is to embed the exit condition in it. When you have to make an infinite loop and then use an if statement with a break to accomplish what you can normally do with something like:
fh = fopen(filename, "r");
while(fgets(line, max, fh) != NULL) {
f(line);
}that's when you need to stop using that language. Also why do if statements have "then"s? Any programming language that uses "then" is awful.