On that note, I think that most of the ways that gofmt changes things is 
nice but I think I'm disabling its use from now on because more than a few 
times I have seen my line count expanded massively when most of the 
statement blocks were just one statement. I appreciate the simplification 
it makes to the compiler to enforce all statement blocks regardless of how 
many statements inside are wrapped, but I don't think it makes sense to add 
two lines just to do something as simple as a break statement.

On Friday, 11 May 2018 11:17:14 UTC+3, Louki Sumirniy wrote:
>
> Until condition is true is not a negation or negative. But placing it 
> before the block implies pretesting as well. But adding a post-condition to 
> the block structure is a big change to the grammar tree structure as well, 
> just for one case, and really run-once before testing is not the most 
> common type of iteration done anyway. 
>
> Any which way it is implemented amounts to the same as having a boolean 
> flag declared as true prior to the loop, and flipping it after. 
>
> If there was a more concise conditional break you wouldn't even care there 
> wasn't a post test, such as this:
>
> for {
>   statements()
>   break if condition()
> }
>
> instead of this:
>
> for {
>   statements()
>   if condition() {
>     break
>   }
> }
>
> but you could just turn off automatic beautification and do this:
>
> for {
>   statements()
>   if condition() { break }
> }
>  
> On Friday, 11 May 2018 09:44:03 UTC+3, kortschak wrote:
>>
>> Until implies a negation. The presence of unless in perl is a horror 
>> resulting from the same semantics - I'm sure it seemed like a good idea 
>> at the time. 
>>
>> On Thu, 2018-05-10 at 23:25 -0700, Louki Sumirniy wrote: 
>> > I think better to use the context of the english language for a  
>> > pre-condition checked after:  
>> > 
>> > until Condition() { ... } 
>> > 
>> > Or maybe just exactly mimics for, but does not test until after one 
>> > run of  
>> > the enclosed block: 
>> > 
>> > until Init(); Condition(); PostAssignment() { ... } 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to