From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by mail.toke.dk (Postfix) with ESMTPS id 6D998989380 for ; Tue, 12 Jul 2022 18:46:07 +0200 (CEST) Authentication-Results: mail.toke.dk; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=BfbIHmIc Received: by mail-wr1-x42b.google.com with SMTP id v16so11956003wrd.13 for ; Tue, 12 Jul 2022 09:46:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=/xipnz1Z0sOTfo5af/GpiFgU4vdNDdl7oEeR50yTwi4=; b=BfbIHmIcZRPA7liGuWyO4+N2rYdWB2ndRcV0JSZ6ikbB74mBRJ7nxvZu9tDoOBDm3Y ytipMKL6lC/yP9xbBs30p+qo512rE21SsTcXlfTziyhSUCN5pgE4ZBLKP1dThq3gL/7a +3xyjRBPtkxOm1Ut8jifMh7vRhQFXujJC2kdK2ov1OHqBEMLxPKPtny13mix6G0QXwd6 R78CllkhhXRg05Nrqh9mGfQ2eDUOuvRFnLxUVwkv07CYlVLfgYsgicR9SU0QOKdm1lV6 eVPNgAbHimLgtM/BKIdcCFFmLxEu5exUC7jiMHpKicrLzKTR2LlYcLcY298q9v1kSYzZ kVMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=/xipnz1Z0sOTfo5af/GpiFgU4vdNDdl7oEeR50yTwi4=; b=Y1UxzFyDKE8Z+0ykWhmalyss0D5ht+AROPUeMCyA6Pz3o9XxqtOY2Fh2htpgX1Oh6W U1bCS5+BqIPZ8lXoBQqCLkEZp1dD3a5fr8Vomjlc/6pAMnXR/FYH+6VfEeR/cQdawJAs ph9FlfO+B5YOKSGs6o9oL/N+ycXw2E5efoZCUmsvxqCSDVeCYBuQgy4tHyZk9fMJF2C/ AIfJt4zqKGT8dcOV/av120KxATNQUbGegK7gGNNeD3otDr4YOq61+NMHGEx97vUFMOsg Ej2zu5yl12C5uUKk8Br58Vj6FkOU6mgCxeGwxqW+ghBGlSl5Gm4thTECXoip2JqN6DLq ayYg== X-Gm-Message-State: AJIora+FoTHBWrHW7UZc83nuzTLgBo+WpXg0E9Y6XmoGhNmSvXwE8oH1 6C/5tUmYhD5Eca2IqpfIIQUf7ENaIA+71mOdXuD05k4ARhmffg== X-Google-Smtp-Source: AGRyM1vwHWcMwqOrn8wtNo9a/OK341ZCbHHX0oTWDB0D73uxy8bClLIzHi0osc+A4KCF2etJishoQ4+B+Zvj5vjafw0= X-Received: by 2002:a5d:6501:0:b0:21d:85ce:6b91 with SMTP id x1-20020a5d6501000000b0021d85ce6b91mr23799899wru.5.1657644365984; Tue, 12 Jul 2022 09:46:05 -0700 (PDT) MIME-Version: 1.0 References: <87lesy8h7s.wl-jch@irif.fr> <87k08i8fua.wl-jch@irif.fr> In-Reply-To: <87k08i8fua.wl-jch@irif.fr> From: Dave Taht Date: Tue, 12 Jul 2022 09:45:53 -0700 Message-ID: To: Juliusz Chroboczek Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Message-ID-Hash: L24Z6Y7SR76VLKBEYP62VNJHNZ4K7KZO X-Message-ID-Hash: L24Z6Y7SR76VLKBEYP62VNJHNZ4K7KZO X-MailFrom: dave.taht@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: galene@lists.galene.org X-Mailman-Version: 3.3.5 Precedence: list Subject: [Galene] Re: OT: generics [was: Heads up: Galene now requires Go 1.16] List-Id: =?utf-8?q?Gal=C3=A8ne_videoconferencing_server_discussion_list?= Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Tue, Jul 12, 2022 at 9:18 AM Juliusz Chroboczek 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 implementatio= n > of B-trees with good cache locality that is type-safe and efficient at al= l > types. > > -- Juliusz --=20 FQ World Domination pending: https://blog.cerowrt.org/post/state_of_fq_code= l/ Dave T=C3=A4ht CEO, TekLibre, LLC