Re: [RFC PATCH 1/2] docs: automarkup.py: Add literal markup of known constants

From: Jonathan Corbet
Date: Sun Jun 13 2021 - 19:13:50 EST


Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx> writes:

> It sounds a nightmare to maintain this by hand, as a list of used
> constants will only grow. IMO, an explicit list should be kept only to
> with the absolute minimum, e.g. for highly-used constants that aren't
> error codes nor FOO_BAR. The only case that occurs to me that fits
> on this rule is 'NULL'.

This is my concern as well. It seems to me like we would always have a
situation where some constants are magically marked up and others
aren't, and people will spend a lot of time trying to figure out why.

Might it not be better to just adopt the convention that these constants
don't need to be marked up at all? NULL is entirely understandable even
when presented in a proportional font. Seems like maybe the best of
both worlds?

Thanks,

jon