bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 0/4] Replace --defines with --header, and introduce --html


From: Kaz Kylheku
Subject: Re: [PATCH 0/4] Replace --defines with --header, and introduce --html
Date: Tue, 15 Sep 2020 01:51:02 -0700
User-agent: Roundcube Webmail/0.9.2

On 2020-09-12 08:38, Akim Demaille wrote:
I'd be happy to read comments about this branch.  Too bad --header and
--html both start with H, there can only be one.  Ideas for a short
option for --html are most welcome.

"Defines", more often than not, does refer to "preprocessor pound defines",
but not always. It's an informal word that broadly covers interface
definitions of all sorts.

If we search for the phrase "file contains defines", we can find
citations for that refering to other than preprocessor definitions.\

For instance:

https://www.cse.unr.edu/~miles/compiler/docs/html/ast_8h-source.html

A comment says "file contains defines of the various types of
astnodes and the fromASTFile function"; these are actually C++
class declarations.

Or a recent kernel commit which says that it adds "defines";
the actual added content is a mixture of #defines, inline
functions and structs.

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d6fb67ff86bb991d5ac18471e5f739bc32e5090e

In C, there is "typedef", derived from "define". A C translation unit
contains "external definitions".

Anyway, the bike-shedding debate between "header" and "defines"
is already settled by the fact that the option already exists
under one of those two names.

"defines" isn't the greatest name, but it's not terrible. Terrible
is, e.g., calling a function "creat" instead of "create".

It pairs with -d, which comes from POSIX. Long and short options
don't have to share the same initial letter, but it's somewhat nice
if they do, and from your remark about "header" and "html", it seems
that you agree.

Adding a synonym and deprecating the old one creates unnecessary
churn that doesn't correspond to any change in functionality or
issue being solved. Which is why we still have "creat".



reply via email to

[Prev in Thread] Current Thread [Next in Thread]