Re: [go-nuts] tuples! tuples! tuples!

2024-04-28 Thread roger peppe
I agree with Ian that the named field syntax is too close to structs. For me, tuples start to make sense in Go mainly because they map directly to and from the tuple-like values we already pass to and from functions, and specifically in the context of a variadic type parameter language feature

Re: [go-nuts] encoding/asn1 I can't Marshal a struct with pointer members

2024-04-28 Thread Def Ceb
Most marshal/unmarshal functions are unwilling to marshal/unmarshal structs with pointer fields. Changing them to direct values fixes this. Example: https://go.dev/play/p/ykmpBm0bXqn I do not think there is any other simple alternative. J Liu: I understand this problem. My real program uses

Re: [go-nuts] tuples! tuples! tuples!

2024-04-28 Thread Ian Lance Taylor
On Sun, Apr 28, 2024 at 4:10 AM Andrew Harris wrote: > > 1. Tuple types > Outside of generics, tuple type syntax requires named fields. > > TupleType = "(" { IdentifierList Type [ ", " ] } ")" . > > // e.g.: > type Point (X, Y int) > > More irregularly, the TupleType syntax is used exclusively to

Re: [go-nuts] encoding/asn1 I can't Marshal a struct with pointer members

2024-04-28 Thread J Liu
I understand this problem. My real program uses export correctly, but the problem I have is not export, asn1: structure error: unknown Go type: *pkg.Girl On Sunday, April 28, 2024 at 9:27:42 AM UTC+8 Jan Mercl wrote: > > > On Sun, Apr 28, 2024, 03:03 J Liu <88592...@gmail.com> wrote: > >> My

[go-nuts] Re: tuples! tuples! tuples!

2024-04-28 Thread 'Brian Candler' via golang-nuts
A few questions (I'm ignoring generics for now, and have not cross-referenced the other proposals). 1. Is it possible to access the n'th element of an implicitly typed tuple? More generally, how do you unpack such a tuple - other than by assigning to a compatible named tuple type? 2. How does

[go-nuts] tuples! tuples! tuples!

2024-04-28 Thread Andrew Harris
Bouncing out from some recent discussions on the github issue tracker, it seems like there's some interest in tuples in Go. I thought the discussion in #66651 led to some interesting ideas, but it's also beginning to drift. Maybe this is a better place to brain-dump some ideas. (This could be a

Re: [go-nuts] Re: all.bash fails on Ubuntu 24.04?

2024-04-28 Thread Ulrich Kunitz
As mentioned in #67088 TestAmbientCaps is skipped because the execve call returns operation not permitted (EPERM). It is not successful as I wrote. Am Sa., 27. Apr. 2024 um 22:58 Uhr schrieb Uli Kunitz : > I agree. Ubuntu 22.04 has gdb version 12.1, Ubuntu 24.04 has 15.0.50. > > The second bug