2 ms·
You get used to it after a while. The NT style has an austere beauty all its own too. Typedefing away pointers creates a uniform and regular syntax --- no readi
by quotemstr 2y ago
You get used to it after a while. The NT style has an austere beauty all its own too. Typedefing away pointers creates a uniform and regular syntax --- no reading declarations forwards then backwards then forwards again. The doc comment style encourages thoughtful architecture. Opaque handle types are common, which is good.
https://computernewb.com/~lily/files/Documents/NTDesignWorkbook/coding.pdf https://computernewb.com/~lily/files/Documents/NTDesignWorkb...
Nobody likes Hungarian though.
- robmccoll 2y agoTypedeffing away pointers means I don't know when copying or passing something if it's by value or by reference.
- nikanj 2y agoIf it starts with LPsomething or Psomething, it's a pointer. Turns out the much-hated hungarian notation does provide value
- account42 2y agoHaving your typedef be simply "something" and then using something* instead of Psomething would provide the same value and also be readable to people not familiar with your particular naming convention.
- jstimpfle 2y agoPointer typedefs are typically useless because at the usage side you will have to declare structs on the stack and take their address anyway. So you need to be aware that a typename refers to a pointer type, and furthermore it's harder to see and really know because you have to resolve the typedef in your head instead of seeing it right there in syntax.