From: Juliusz Chroboczek <jch@irif.fr>
To: Dave Taht <dave.taht@gmail.com>
Cc: galene@lists.galene.org
Subject: [Galene] OT: generics [was: Heads up: Galene now requires Go 1.16]
Date: Tue, 12 Jul 2022 18:18:21 +0200 [thread overview]
Message-ID: <87k08i8fua.wl-jch@irif.fr> (raw)
In-Reply-To: <CAA93jw7dL1x=HWQtfhLtfis5evzvXgCPmt-b5zxX5rr4ymLBpA@mail.gmail.com>
> btw, what are your feelings about go generics?
They are smartly done, unlike C++ generics they don't impose a single
implementation strategy. They're done in Church style (where
instantiation consists in passing a type parameter), while I tend to
prefer Curry style (where instantiation is modelled as a case of
subtyping). They don't support specialisation (where the user writes
a specially optimised implementation for the types they really care
about), which might or might not be a limitation.
We'll see if we get any nice libraries. I'd love to see an implementation
of B-trees with good cache locality that is type-safe and efficient at all
types.
-- Juliusz
next prev parent reply other threads:[~2022-07-12 16:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-12 15:48 [Galene] Heads up: Galene now requires Go 1.16 Juliusz Chroboczek
2022-07-12 15:52 ` [Galene] " Dave Taht
2022-07-12 16:18 ` Juliusz Chroboczek [this message]
2022-07-12 16:45 ` [Galene] Re: OT: generics [was: Heads up: Galene now requires Go 1.16] Dave Taht
2022-07-13 1:00 ` Dave Taht
2022-07-13 9:40 ` Juliusz Chroboczek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.galene.org/postorius/lists/galene.lists.galene.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k08i8fua.wl-jch@irif.fr \
--to=jch@irif.fr \
--cc=dave.taht@gmail.com \
--cc=galene@lists.galene.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox