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

    From Leandro T. C. Melo@ltcmelo@gmail.com to comp.std.c on Tue Nov 29 04:31:54 2022
    From Newsgroup: comp.std.c

    Hi everyone,

    I'm working on:

    - n2698 Enabling Generic Functions and Parametric Types in C

    The proposal is still a draft, but it already is quite complete; I even provide a prototype for it.

    If you're interested in taking a look at the proposal, here it is:

    - https://ltcmelo.com/n2698.pdf

    I'd appreciate any feedback a lot.

    Thank you,
    Leandro
    --- Synchronet 3.19c-Linux NewsLink 1.113
  • From Tim Rentsch@tr.17687@z991.linuxsc.com to comp.std.c on Mon Jan 2 07:48:13 2023
    From Newsgroup: comp.std.c

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

    Hi everyone,

    I'm working on:

    - n2698 Enabling Generic Functions and Parametric Types in C

    The proposal is still a draft, but it already is quite complete; I
    even provide a prototype for it.

    If you're interested in taking a look at the proposal, here it is:

    - https://ltcmelo.com/n2698.pdf

    I'd appreciate any feedback a lot.

    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, and to the extent that what is being
    proposed is evident it looks like it is not very well thought
    out. The constructs described look like they are more or less a
    trimmed-down version of C++ templates, 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).

    Also the writing and presentation are awful, which really doesn't
    help.

    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.

    Specific comment: don't use the word "generic". C already has a
    construct that could be called "generic", namely _Generic.
    --- Synchronet 3.20a-Linux NewsLink 1.113
  • From Leandro T. C. Melo@ltcmelo@gmail.com to comp.std.c on Tue Jan 3 03:32:21 2023
    From Newsgroup: comp.std.c

    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 cliché.
    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).
    --- Synchronet 3.20a-Linux NewsLink 1.113
  • From Tim Rentsch@tr.17687@z991.linuxsc.com to comp.std.c on Sun Jan 29 10:57:04 2023
    From Newsgroup: comp.std.c

    "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.
    --- Synchronet 3.20a-Linux NewsLink 1.113
  • From Leandro T. C. Melo@ltcmelo@gmail.com to comp.std.c on Sun Jan 29 14:35:53 2023
    From Newsgroup: comp.std.c

    On Sunday, January 29, 2023 at 3:57:06 PM UTC-3, Tim Rentsch wrote:

    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.

    You're correct, that was my mistake: I should've said constructive feedback. Yours was destructive; and with vague criticism and evidences you might have not read the proposal through.

    I'd still give you my genuine appreciation if you make your feedback constructive, e.g. by answering the questions I left to you.
    --- Synchronet 3.20a-Linux NewsLink 1.113