On Mon, 5 Sep 2016 09:53:57 +0200
Anselm R Garbe <garbeam_AT_gmail.com> wrote:
Hey Anselm,
> That's wrong. There are good reasons like forward declarations /
> opaque type definitions that incorporate typedef.
how are you using the term forward declaration in this context? Are you
referring to function prototypes with "simpler" arguments?
As to opaque type definitions: There are very few cases where this
actually makes sense, especially in a language like C. Opaque types
often "present" themselves when developing toolboxes for numerical
issues, but often the incentives are not too high.
In dwm/dmenu the convention is to have the first type-letter uppercase,
like "Display". This is imho a good naming convention in itself and
does not require a new "format" for sizeof without parentheses if you
are so inclined to use typedefs for your structs.
I don't see a good reason to use typedefs in dwm/dmenu in the first
place, but I respect the per-process style.
Cheers
FRIGN
--
FRIGN <dev_AT_frign.de>
Received on Mon Sep 05 2016 - 10:05:16 CEST