Re: [go-nuts] could functions returning multiple values make templates behind the scenes

2019-01-22 Thread 'simon place' via golang-nuts
thanks again. FWIW seems to me this might have some interesting effects, otherwise unobtainable, given the different 'clones' still all implement the same interface. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this gro

Re: [go-nuts] could functions returning multiple values make templates behind the scenes

2019-01-22 Thread Ian Lance Taylor
On Tue, Jan 22, 2019 at 7:55 AM 'simon place' via golang-nuts wrote: > > thanks for the info, answered my OP, but raised some more questions... > > presumably the go runtime is compiled with gccgo? so would that mean there > are possibly cloned functions in it? When using gccgo, yes, and yes. >

Re: [go-nuts] could functions returning multiple values make templates behind the scenes

2019-01-22 Thread 'simon place' via golang-nuts
thanks for the info, answered my OP, but raised some more questions... presumably the go runtime is compiled with gccgo? so would that mean there are possibly cloned functions in it? and i can see that gcc can clone for know value (constant) parameters, but can't see any other techniques, su

Re: [go-nuts] could functions returning multiple values make templates behind the scenes

2019-01-21 Thread Ian Lance Taylor
On Mon, Jan 21, 2019 at 4:26 PM 'simon place' via golang-nuts wrote: > > i thought i remembered, a few releases back, that the go compiler started > doing wider ranging analysis that allowed it to optimise and do some low > level dead code elimination? > > if so, wouldn't that mean that any extr

Re: [go-nuts] could functions returning multiple values make templates behind the scenes

2019-01-21 Thread 'simon place' via golang-nuts
i thought i remembered, a few releases back, that the go compiler started doing wider ranging analysis that allowed it to optimise and do some low level dead code elimination? if so, wouldn't that mean that any extra blank-return 'clones' would potentially be able to be compiled with more code

Re: [go-nuts] could functions returning multiple values make templates behind the scenes

2019-01-21 Thread Ian Lance Taylor
On Sun, Jan 20, 2019 at 2:44 PM 'simon place' via golang-nuts wrote: > > wouldn't the compiler be able to use the fact that a return value is known > not to be being used in a particular call, somewhere one or more of the > returned values are assigned to a blank, to be able to generate faster c

[go-nuts] could functions returning multiple values make templates behind the scenes

2019-01-20 Thread 'simon place' via golang-nuts
wouldn't the compiler be able to use the fact that a return value is known not to be being used in a particular call, somewhere one or more of the returned values are assigned to a blank, to be able to generate faster code for that call? or is it already being done? because, it seems to me, kno