From: Dave Taht <dave.taht@gmail.com>
To: Juliusz Chroboczek <jch@irif.fr>
Cc: galene@lists.galene.org
Subject: [Galene] Re: OT: generics [was: Heads up: Galene now requires Go 1.16]
Date: Tue, 12 Jul 2022 09:45:53 -0700 [thread overview]
Message-ID: <CAA93jw748iMCJnNSd1ZgF489Z4Szbd3vQdyL3-xW962f60zpJQ@mail.gmail.com> (raw)
In-Reply-To: <87k08i8fua.wl-jch@irif.fr>
On Tue, Jul 12, 2022 at 9:18 AM Juliusz Chroboczek <jch@irif.fr> wrote:
>
> > 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.
I hope they evolve. This was a very disappointing analysis of go generics:
https://planetscale.com/blog/generics-can-make-your-go-code-slower
However, the rust version of generics is essentially programming the
AST directly and if I really wanted a lisp, I'd have stuck with lisp.
I didn't care for C++ much, but BOOST was a bright light in it.
>
> 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
--
FQ World Domination pending: https://blog.cerowrt.org/post/state_of_fq_codel/
Dave Täht CEO, TekLibre, LLC
next prev parent reply other threads:[~2022-07-12 16:46 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 ` [Galene] OT: generics [was: Heads up: Galene now requires Go 1.16] Juliusz Chroboczek
2022-07-12 16:45 ` Dave Taht [this message]
2022-07-13 1:00 ` [Galene] " 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=CAA93jw748iMCJnNSd1ZgF489Z4Szbd3vQdyL3-xW962f60zpJQ@mail.gmail.com \
--to=dave.taht@gmail.com \
--cc=galene@lists.galene.org \
--cc=jch@irif.fr \
/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