Go for loop-nobreak then :)

In java you can create nobreak statement like this:
int i;
for(i=0; i < 100; i++) {if(...) break;}
if(i == 100) System.out.println("The loop finished without breaking")

Which has no more side effects but bringing "i" into outer scope ( julia 
does this anyway ). I am not so sure about goto side effects tho!


Dne čtvrtek 12. května 2016 13:27:57 UTC+2 Stefan Karpinski napsal(a):
>
> IIRC, the issue with this was that the Python meaning is pretty 
> unintuitive (but sometimes useful) and having this syntax but having it 
> mean something else (more intuitive) seems like causing unnecessary 
> confusion for people coming from Python, hence the lack of movement. 
> Arguably, the Python meaning is less confusing to express with gotos and 
> labels.
>
> On Wed, May 11, 2016 at 3:49 PM, Isaiah Norton <[email protected] 
> <javascript:>> wrote:
>
>> That issue is marked as a 1.0 milestone, which should be interpreted as 
>> "decision before 1.0" in this case. But clearly a low priority.
>>
>> On Wed, May 11, 2016 at 5:26 AM, Ford Ox <[email protected] <javascript:>
>> > wrote:
>>
>>> Will loop-else python like syntax be implemented in future? I have read 
>>> this <https://github.com/JuliaLang/julia/issues/1289> topic, but no 
>>> statement has been made.
>>>
>>
>>
>

Reply via email to