On Thu, Oct 31, 2019 at 1:49 PM Max <massimiliano.ghila...@gmail.com> wrote:
>
> It's not just a matter of gofmt: the "implicit semicolon" rule of Go syntax 
> is triggered at the end of this line
> ```
> if Variable1 == true
> ```
> causing it to be parsed as
> ```
> if Variable1 == true;
> ```
> Any operator in the following line arrives too late to change that.
>
> So to implement what you propose, Go syntax rules would need to be changed.
>
> While they are not set in stone, the added convenience of your new syntax
> is probably too small to justify a language change (just my opinion - feel 
> free
> to propose such a change to Go developers)

I doubt we would change the semicolon insertion rule at this point in
time.  But if you do want to propose a change, make sure that the new
rule is unambiguous and is purely lexical.  The rule that Go uses was
based on poor experiences with the way that Javascript handles
semicolon insertion.

Ian

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcVsFkX8WXKhBTt6qR%3DbxVD7bEE2e5idLP8aKc7vPwd1FQ%40mail.gmail.com.

Reply via email to