[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: I'd give my right arm for a continue statement
- From: Axel Kittenberger <axkibe@...>
- Date: Mon, 24 Jan 2011 21:28:42 +0100
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,
- References:
- Re: I'd give my right arm for a continue statement, Michal Kottman
- Re: I'd give my right arm for a continue statement, steve donovan
- Re: I'd give my right arm for a continue statement, Axel Kittenberger
- Re: I'd give my right arm for a continue statement, David Kastrup
- Re: I'd give my right arm for a continue statement, GrayFace
- Re: I'd give my right arm for a continue statement, T T
- Re: I'd give my right arm for a continue statement, David Kastrup
- Re: I'd give my right arm for a continue statement, Mark Hamburg
- Re: I'd give my right arm for a continue statement, Dirk Laurie
- Re: I'd give my right arm for a continue statement, Shmuel Zeigerman
- Re: I'd give my right arm for a continue statement, Dirk Laurie