(Not sure if this belongs in tech@ or misc@)

What is the thinking around non-functional code changes that just
improve clarity without functionality changes?  I can imagine bad
experiences with that, but there is certainly room for improvement.

For instance, in the wsdisplay_emulops structure, there are:

int     (*alloc_attr)(void *c, int fg, int bg, int flags, long *attrp);
void    (*unpack_attr)(void *c, long attr, int *fg, int *bg, int *ul);

And at the end of the structure is this comment, showing that at
least someone (other than me) was confused by it:
        /* XXX need a free_attr() ??? */

I would suggest that alloc_attr should be renamed to pack_attr, but
there are 84 matches on alloc_attr across 39 unique files.

Similarly, I am taking notes as I read the code, and adding a few
comments in various files and functions could help other people get
up to speed much faster in the future, but I am hesitant to submit
patches. I am hoping to write a decent article about my explorations,
but inline comments are more durable documentation.


Reply via email to