[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: argmatch: accept perfect matches in documented arglists
From: |
Bruno Haible |
Subject: |
Re: argmatch: accept perfect matches in documented arglists |
Date: |
Sun, 19 May 2019 14:01:43 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-145-generic; KDE/5.18.0; x86_64; ; ) |
Hi Akim,
> I am saying that the values (those in backup_doc_vals for instance) are not
> required to be ints. I'm saying that in the example above backup_doc_vals
> are enums, but they could be floats, structs, chars, whatever. So there
> cannot be a single type that would make it possible to write
Ah, now I understand you.
> Or are you suggesting that users should define their own type. Or do you
> mean to provide a macro to instantiate such a type given a data type? Or are
> you suggesting to restrict to a single size data type?
Yes, these are the possible options.
As far as I understand, the type would consist of
- an int, an enum value, or even a pointer to a statically allocated object
defined by the programmer,
- a constant string: the option,
- (optional) a constant string: the documentation.
Restricting the type of the first field does not look like a good idea to me.
If the users define their own type, they have manual work when you add the
documentation string or other new features to argmatch.
So I would prefer a macro with one argument, the type of the first field.
Bruno
- Re: argmatch: accept perfect matches in documented arglists, Akim Demaille, 2019/05/02
- Re: argmatch: accept perfect matches in documented arglists, Bruno Haible, 2019/05/05
- Re: argmatch: accept perfect matches in documented arglists, Akim Demaille, 2019/05/19
- Re: argmatch: accept perfect matches in documented arglists, Bruno Haible, 2019/05/19
- Re: argmatch: accept perfect matches in documented arglists, Akim Demaille, 2019/05/19
- Re: argmatch: accept perfect matches in documented arglists,
Bruno Haible <=
- Re: argmatch: accept perfect matches in documented arglists, Akim Demaille, 2019/05/19
- Re: argmatch: accept perfect matches in documented arglists, Akim Demaille, 2019/05/19
- Re: argmatch: accept perfect matches in documented arglists, Bruno Haible, 2019/05/19
- Re: argmatch: accept perfect matches in documented arglists, Paul Eggert, 2019/05/19
- Re: argmatch: accept perfect matches in documented arglists, Akim Demaille, 2019/05/19
- Re: argmatch: accept perfect matches in documented arglists, Akim Demaille, 2019/05/21
- Re: argmatch: accept perfect matches in documented arglists, Paul Eggert, 2019/05/21
- Re: argmatch: accept perfect matches in documented arglists, Akim Demaille, 2019/05/22
- Re: argmatch: accept perfect matches in documented arglists, Bruno Haible, 2019/05/22
- Re: argmatch: accept perfect matches in documented arglists, Akim Demaille, 2019/05/25