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

Mainly because variable declarations are "backwards" in C. People try to read code left to right, but C declarations should be read right to left. Pile one things like the dual use of the static keyword, typedefs, and having multiple consts in a declaration figuring out the type of a variable can be a real chore. Dan Saks has a great article that hits on just the issues with const. http://dansaks.com/articles/1998-06%20Placing%20const%20in%2...


Or the classic "clockwise spiral rule" http://c-faq.com/decl/spiral.anderson.html :)




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

Search: