On 5 September 2016 at 09:50, FRIGN <[email protected]> wrote: > On Mon, 5 Sep 2016 09:42:47 +0200 > Anselm R Garbe <[email protected]> wrote: >> Why is typedef'ing structs bad practice? > > because there's no reason for it other than syntax candy. It also hides
That's wrong. There are good reasons like forward declarations / opaque type definitions that incorporate typedef. > from the user what he is dealing with and when I want to lookup a > struct definition I often have to jungle-jump across multiple typedef > layers to finally reach the definition. Of course typedef's can over-complicate code, but they can also simplify code. I'm referring to the latter. One can find good and bad examples, imho dwm/dmenu are good examples of typedef usage. I'm just referring to those. Granted, Xlib is more of the sort bad example. Cheers, Anselm
