Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.std.c > #6475

Re: request for feedback: n2698 - generic functions and parametric types

Path csiph.com!weretis.net!feeder8.news.weretis.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From Tim Rentsch <tr.17687@z991.linuxsc.com>
Newsgroups comp.std.c
Subject Re: request for feedback: n2698 - generic functions and parametric types
Date Sun, 29 Jan 2023 10:57:04 -0800
Organization A noiseless patient Spider
Lines 60
Message-ID <86y1plf9tr.fsf@linuxsc.com> (permalink)
References <04f0a483-554c-40d2-bf79-4c5155a0ebban@googlegroups.com> <865ydpq6o2.fsf@linuxsc.com> <422b8eb9-f6b0-403d-af65-c433aec47a9dn@googlegroups.com>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Injection-Info reader01.eternal-september.org; posting-host="8ce3893f3eb724e7abcf14dabf224dec"; logging-data="3013316"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1//8Lrm1epBHLcf9CYiavs+mOrXh2XZdrQ="
User-Agent Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock sha1:CB/LVFUVK01/ga73iIcb3uavgq0= sha1:aMRbjrgleUbsij2CX5fxm02q3Es=
Xref csiph.com comp.std.c:6475

Show key headers only | View raw


"Leandro T. C. Melo" <ltcmelo@gmail.com> writes:

> On Monday, January 2, 2023 at 12:48:17 PM UTC-3, Tim Rentsch wrote:
>
>> This proposal is painfully bad, along a variety of axes.
>> Perhaps the most important axes are that it isn't clear exactly
>> what is being proposed,
>
> The proposal (draft) describes, with examples, how a programmer
> writes generic functions/parametric types and how a compiler
> translates them in stages;  what's left unclear in your opinion?
>
>> and to the extent that what is being
>> proposed is evident it looks like it is not very well thought
>> out.
>
> Could you justify this claim?
>
>> The constructs described look like they are more or less a
>> trimmed-down version of C++ templates,
>
> Why do you think so?
> The constructs involved in the proposal, along with the instantiation
> mechanism?which isn't based on template argument deduction
> rule/two-phase name lookup?, aren't borrowed from C++.
> In terms of the expressivity of the design, it's sort of a
> "trimmed-down version" of C++ templates, just as it's a trimmed-down
> version of generics in C#/Java/Go, typeclasses in Haskell, etc.
>
>> but with an even worse
>> syntax than templates (and I can't tell what differences there
>> might be in the semantics, in areas where the two overlap).
>
> If you don't like the syntax, fine... but there shouldn't be a single
> overlap in the semantics;  could you point out to me what you refer
> to?
>
>> Also the writing and presentation are awful, which really doesn't
>> help.
>
> Again, without a justification (e.g., in terms of
> writing/presentation criteria), your statement doesn't have any
> credibility.
>
>> I am sympathetic to the idea that C might benefit from having
>> some kind of template or parameterized type mechanism, but what
>> is suggested in this proposal is not it.
>
> What a cliche.
>
>> Specific comment:  don't use the word "generic".  C already has a
>> construct that could be called "generic", namely _Generic.
>
> _Generic is addressed in the proposal;  where the use of the word
> "generic" is intentional (and explained).

Your earlier posting said "I'd appreciate any feedback a lot",
and feedback is what I gave.  Were you actually looking for
someone to have an argument with?  I don't see any appreciation
expressed in your comments.

Back to comp.std.c | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

request for feedback: n2698 - generic functions and parametric types "Leandro T. C. Melo" <ltcmelo@gmail.com> - 2022-11-29 04:31 -0800
  Re: request for feedback: n2698 - generic functions and parametric types Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-01-02 07:48 -0800
    Re: request for feedback: n2698 - generic functions and parametric types "Leandro T. C. Melo" <ltcmelo@gmail.com> - 2023-01-03 03:32 -0800
      Re: request for feedback: n2698 - generic functions and parametric types Tim Rentsch <tr.17687@z991.linuxsc.com> - 2023-01-29 10:57 -0800
        Re: request for feedback: n2698 - generic functions and parametric types "Leandro T. C. Melo" <ltcmelo@gmail.com> - 2023-01-29 14:35 -0800

csiph-web