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

Re: [Xen-devel] [PATCH] CODING_STYLE: discourage use of underscores where alternatives exist



>>> On 07.06.18 at 23:21, <julien.grall@xxxxxxx> wrote:
> On 07/06/2018 14:56, Jan Beulich wrote:
>> Underscores commonly require two keypresses while hyphen / dash requires
>> just one, and the visual separation effect of both is basically the same.
> 
> I don't buy this argument. A good programmer is lazy by definition but 
> not that much. C does not allow identifiers with hyphen, so you end up 
> to use underscore most of time as you don't often create new filename 
> and most of the editors have filename auto-completion.

Filenames are just one aspect. I don't think there's any auto completion
for command line options. I'm also not convinced that auto completion is
a meaningful argument here in the first place: In many cases, it wouldn't
help anyway (take x86's guest_*.h or mach_*.h as examples), no
matter whether underscores or hyphens are used.

Further, the laziness aspect is only one here anyway. To me, the use
of underscores where better alternatives exist is an abuse; it often
seems to me as if people doing so simply don't care to get out of their
programming language determined mindset. In the end it's not just
hyphens that are available as separators. It's just that in normal
written text hyphens (other than underscores) also get used for
(remotely) similar separation purposes.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.