Eh, doesn't seem that hard to write `while true` and `while` by itself is
kind of confusing. I also don't necessarily think this is how everyone
should write loops, but I increasingly find myself starting out by writing
`while true` and then putting conditions where they are needed as I go.
Then after I've written the loop out, I'll figure out how to refactor it as
a while condition.


On Tue, Apr 8, 2014 at 3:38 PM, Mike Innes <mike.j.in...@gmail.com> wrote:

> If while true loops are idiomatic, could we perhaps make the true
> optional?
>
>
> On Tuesday, 8 April 2014 18:57:53 UTC+1, Stefan Karpinski wrote:
>
>> Good idea. For what it's worth, these days I would be perfectly happy to
>> only program with while true loops and explicit breaks.
>>
>> On Apr 8, 2014, at 1:41 PM, Kevin Squire <kevin....@gmail.com> wrote:
>>
>> Although not too frequent, this would be a good FAQ entry.
>>
>> Cheers, Kevin
>>
>>
>> On Tuesday, April 8, 2014, Pierre-Yves Gérardy <pyg...@gmail.com> wrote:
>>
>>> This does the trick:
>>>
>>> while true
>>>     # ...
>>>     condition || break
>>> end
>>>
>>>
>>>
>>> On Tuesday, April 8, 2014 5:26:00 AM UTC+2, Freddy Chua wrote:
>>>>
>>>> as stated in question..
>>>>
>>>

Reply via email to