Y
Hacker News
new
|
ask
|
show
|
jobs
by
andreareina
2874 days ago
Does anyone know
why
reverse christmas tree order of declarations (i.e. longest to shortest line length) is part of the style guide?
2 comments
catwell
2873 days ago
I don't know in their case, but I know it's the style used by Hisham Muhammad (author of htop and LuaRocks among other things), and he explained why here:
https://hisham.hm/2018/06/16/when-listing-repeated-things-ma...
link
hinkley
2873 days ago
I’m wondering that too. What happens when a variable is initialized as a consequence of the state of two other variables (which would tend to be a longer statement)?
link