Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
f1shy
23 days ago
|
parent
|
context
|
favorite
| on:
Brent's Encapsulated C Programming Rules (2020)
I also personally find totally confusing leaving the * in the middle of nowhere, like flapping in the breeze.
unwind
23 days ago
[–]
Where would you put it? The const of the pointer is not the main point, it's just extra clarity that the allocated pointer is not as easily overwritten which would leak the memory.
f1shy
22 days ago
|
parent
[–]
I put it attached to the variable name when possible, if not attached to the type.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: