Re: [go-nuts] Re: Why this compilation error ?

2025-03-17 Thread 'Dan Kortschak' via golang-nuts
On Mon, 2025-03-17 at 21:03 -0700, tapi...@gmail.com wrote: > I prefer *new(T) over T{}, because not only the reason here, but also > the former has a smaller inline cost. What do you mean by "inline cost"? https://godbolt.org/z/h8Krq7W8G -- You received this message because you are subscribed

Re: [go-nuts] Re: Why this compilation error ?

2025-03-17 Thread tapi...@gmail.com
I prefer *new(T) over T{}, because not only the reason here, but also the former has a smaller inline cost. On Monday, March 17, 2025 at 4:49:51 PM UTC+8 Jan Mercl wrote: > On Mon, Mar 17, 2025 at 9:45 AM tapi...@gmail.com > wrote: > > > You can use *new(Version) instead of Version{} to avoid

Re: [go-nuts] Making Go More Accessible to Non-English Speakers

2025-03-17 Thread 'Sean Liao' via golang-nuts
There's also https://go.dev/issue/67562 - sean On Sun, Mar 16, 2025, 23:00 Ian Lance Taylor wrote: > On Sun, Mar 16, 2025 at 3:31 PM Jayathra Abeywarna > wrote: > > > > I’m exploring ways to make programming more accessible to people who > don’t speak English or use the Latin script. Right now

Re: [go-nuts] Re: Why this compilation error ?

2025-03-17 Thread Jan Mercl
On Mon, Mar 17, 2025 at 9:45 AM tapi...@gmail.com wrote: > You can use *new(Version) instead of Version{} to avoid parsing ambiguity. FTR: This would never pass my review. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from thi

[go-nuts] Re: Why this compilation error ?

2025-03-17 Thread tapi...@gmail.com
You can use *new(Version) instead of Version{} to avoid parsing ambiguity. On Sunday, March 16, 2025 at 9:30:25 PM UTC+8 Christophe Meessen wrote: > Hello, > > You'll find the minimal example code generating the compilation error > here: https://go.dev/play/p/Vb-dNr2DpzM > > It is easy to get ar