lua-users home
lua-l archive

Re: I'd give my right arm for a continue statement

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


rather more like this:
task_description_saving_a_comment(one_var, another_var, third_var, yetanother)
 -- code block using the vars --
 if condition then
 return true one_var, another_var, third_var, yetanother
 end
 code
 return true one_var, another_var, third_var, yetanother
end
while condition do
   one_var, another_var, third_var, yetanother =
task_description_saving_a_comment(one_var, another_var, third_var,
yet_anothervar)
end
--
you could a close instead with upvalues, but that would be a close
creation for every loop iteration, super slow. passing arguments to a
subroutine, getting arguments back is also not ideal.
It really makes the code slow and unreadable.
Yes you do not *need* a form of continue, but a lot of code gets just
more beautiful with, all the workarounds are either 2-3 of these:
ugly, slow, errorprone, hardtoread
You find messages from Luiz and Roberto on the list, they never said
"not planing it, not wanting etc", but as I said before "we arent yet
sure how we want to it". Thats why, lets just hope the idea will get
there.
Kind regards,

AltStyle によって変換されたページ (->オリジナル) /