Re: [go-nuts] Two Questions About Maps

2021-12-19 Thread jlfo...@berkeley.edu
On Sunday, December 19, 2021 at 9:24:00 AM UTC-8 Jan Mercl wrote: > On Sun, Dec 19, 2021 at 6:03 PM jlfo...@berkeley.edu > wrote: > > 1) Let's say I wanted to make the map elements smaller, so the map value > would be a pointer to a structure, not the structure itself. I couldn't > figure

Re: [go-nuts] Two Questions About Maps

2021-12-19 Thread Brian Candler
Oops, please ignore that. I was modifying the wrong play code. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To

Re: [go-nuts] Two Questions About Maps

2021-12-19 Thread Brian Candler
On Sunday, 19 December 2021 at 17:24:48 UTC b...@gmail.com wrote: > you must use pointers, otherwise you can not do something like this: > > ft["a"].name = "b" > > As the entries in the map are non-addressable. > ??? https://go.dev/play/p/ubx-WnElJOY -- You received this message because you

Re: [go-nuts] Two Questions About Maps

2021-12-19 Thread Bruno Albuquerque
https://go.dev/play/p/fglmNnWFUxP I would not worry about using pointers inside the map if the data is really read only. If it is not, you must use pointers, otherwise you can not do something like this: ft["a"].name = "b" As the entries in the map are non-addressable. On Sun, Dec 19, 2021 at

Re: [go-nuts] Two Questions About Maps

2021-12-19 Thread Jan Mercl
On Sun, Dec 19, 2021 at 6:03 PM jlfo...@berkeley.edu wrote: > 1) Let's say I wanted to make the map elements smaller, so the map value > would be a pointer to a structure, not the structure itself. I couldn't > figure out how to modify this program so that the initialization still > worked.

[go-nuts] Two Questions About Maps

2021-12-19 Thread jlfo...@berkeley.edu
Consider the following extremely condensed program: package main type func_type func (a string)(out int) type fte struct { name string expand_args bool function func_type } var ft = map[string]fte { "a":{"a", true, func_a}, }; func func_a(a

[go-nuts] Generic symbol name in binary

2021-12-19 Thread 'Dmitry Neverov' via golang-nuts
Is the naming scheme for generic symbols in binaries described somewhere? Thanks! -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to