|
@dvyukov | |||||
|
I want strange: C/C++ editor to revert func order on load&revert back on save so that I dont start with least important noise, scroll down and then read backwards
You cant unsee how unnatural doing everything backwards once worked in lang with no "lets save 1 parsing pass" legacy
|
||||||
|
||||||
|
Vegard Nossum
@vegard_no
|
31. sij |
|
I actually really like it when code is top to bottom. You build upon earlier definitions. In mathematics, you start with definitions and axioms, then you prove your lemmas, then you prove your theorems. In fiction you also start with the backstory and build up to the climax.
|
||
|
|
||
|
Dmitry Vyukov
@dvyukov
|
31. sij |
|
R u sure u r objective here? and not suffering Stockholm syndrome? :)
Orphan counts that need to be per-cpu is not how you start explaining TCP
elixir.bootlin.com/linux/latest/s…
You dont start explaining signals with the fact that you need isolated slab for sigqueue
elixir.bootlin.com/linux/v5.5/sou…
|
||
|
|
||
|
knilch0r
@knilch0r
|
31. sij |
|
I've seen coding styles where you
1. declare static helpers
2. implement externally visible functions
3. implement static helpers.
when reading top-to-bottom, you'll get a short summary of the helpers first and then can focus on the important part.
|
||
|
|
||
|
Dmitry Vyukov
@dvyukov
|
31. sij |
|
Pre-declaring static helpers is probably the least evil. But still unnecessary boilerplate and duplication (need to change 2 places).
|
||
|
|
||