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
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
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
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
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