[go-nuts] Evaluation order of return

2020-09-21 Thread cs.ali...@gmail.com
Why does the compiler change evaluation order of return when adding a new field to a struct? I didn't check the compiler output, I only guess it somehow changes the order. play package main import ( "fmt" ) type Number interface { Value() int } type Integ

Re: [go-nuts] Evaluation order of return

2020-09-23 Thread cs.ali...@gmail.com
ecific order of evaluation, that won't help the > fact that the program is hard to read and hard to understand. So I > don't see a good argument for forcing many well written programs to > run very slightly slower in order to make poorly written programs > behave consistently. Bu

Re: [go-nuts] Evaluation order of return

2020-09-24 Thread cs.ali...@gmail.com
I understood perfectly now, thanks for the explanations and the link! I really appreciate you guys! On Thursday, September 24, 2020 at 3:28:10 AM UTC+3 Ian Lance Taylor wrote: > On Wed, Sep 23, 2020 at 1:10 AM cs.ali...@gmail.com > wrote: > > > > I am not actually quest