Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have to say... the code is beautiful: Full English descriptive variable names and nearly every function is documented. As AngularJS has shown, cleaner, consistent code and architecture style = more contributors.

Take a look here for example: https://github.com/minoca/os/blob/master/kernel/io/iobase.c#...



Why the initial capital on local variable names? I don't think I've ever seen that in C code. (Usually types and exported functions are capitalized.)

It kind of makes the code look like Pascal. Nothing wrong with that, really.


This looks like the NT kernel coding style, especially with the pointless typedefs for things like PVOID and the PascalCased function names with prefixes like `IopPerformIoOperation`. I looked up the Minoca founders on Linked In and, behold, they both worked as engineers on the Windows NT team. :)


NT source code typically (and I say typically, because it's a mish-mash of tens of thousands of people's work over 35 years of development) has local variable names in first-letter-lower camel case. If these guys worked on Windows, it's kind of surprising they didn't follow that convention.


Usually it's uppercase with a lowercase "Hungarian notation" prefix. Without the prefix, it starts with uppercase.


I think it actually makes more sense, since in english we capitalize names (variables), but lowercase generic nouns (types). I agree that it is unusual, though.


You basically just said that the Windows kernel code is beautiful, because they are using exactly the same coding style...


To be fair, the Windows kernel code is beautiful in a lot of ways.


Tcl has some nice code done in a similar style:

https://github.com/tcltk/tcl/blob/master/generic/tclEvent.c




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: