Interestingly, Go also kind of has a built-in set data type by using map
keys! https://go.dev/play/p/3-ZEKPSPUEh
I know that's not really what you mean, but I think it's a cool pattern.
On Tue Apr 12, 2022, 07:50 PM GMT, Ian Lance Taylor wrote:
On Mon, Apr 11, 2022 at 11:19 PM 'Jack Li' via gol
On Mon, Apr 11, 2022 at 11:19 PM 'Jack Li' via golang-nuts
wrote:
>
> Why Go provides only 2 built-in data structures, slice and map. It has just
> more than C, but less than all other programming languages I've heard of,
> C++, Python, Swift, Rust.
>
> I think this simplicity attracts me very m
Very true!
On Tue, Apr 12, 2022 at 8:36 PM Robert Engels wrote:
> Nit but you can certainly create maps and slices in a library - you use
> methods not language syntax - as long as you have pointers and type
> casting.
>
> On Apr 12, 2022, at 1:30 PM, Jesper Louis Andersen <
> jesper.louis.ander
Nit but you can certainly create maps and slices in a library - you use methods
not language syntax - as long as you have pointers and type casting.
> On Apr 12, 2022, at 1:30 PM, Jesper Louis Andersen
> wrote:
>
>
>> On Tue, Apr 12, 2022 at 8:19 AM 'Jack Li' via golang-nuts
>> wrote:
>>
On Tue, Apr 12, 2022 at 8:19 AM 'Jack Li' via golang-nuts <
golang-nuts@googlegroups.com> wrote:
> Hi group,
>
> Why Go provides only 2 built-in data structures, slice and map. It has
> just more than C, but less than all other programming languages I've heard
> of, C++, Python, Swift, Rust.
>
> I
Hi group,
Why Go provides only 2 built-in data structures, slice and map. It has just
more than C, but less than all other programming languages I've heard of, C++,
Python, Swift, Rust.
I think this simplicity attracts me very much. Sometimes I can use only one
data structures for a task. B