Re: Javadoc comments in kernel source?

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

 



Greg KH wrote:

Ick ick ick.

Did you read the section about variable names?

Ok, I'll follow the guidelines. However, I did read your presentation, and I don't see anything there that technically says I can't use 1- or 2-letter variable prefixes:


- Be descriptive
- Be concise
- No MixedCase
- No encoding the type within the name
- Global variables only when necessary
- Local variables short and to the point

I interpret #4 as meaning no Hungarian notation. i_, o_, io_, l_, iv_, and g_ prefixes are not 'types'. Plus, they allow me to follow the other guidelines better, especially #1, #2, and #6.

Have you ever seen variable names like this in the core kernel code?

No, but your presentation includes plenty of examples of files that are in the core kernel code and that violate the guidelines. I got the impression that some people are allowed to get away with "bad" coding styles and others aren't.


In short, no, don't do this.

Like I said, I'll conform to the guidelines as strictly as possible, but I just wanted to get your thoughts on these things.


--
Timur Tabi
Staff Software Engineer
timur.tabi@ammasso.com

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux