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.
-
-
-
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 https://elixir.bootlin.com/linux/latest/source/net/ipv4/tcp.c … You dont start explaining signals with the fact that you need isolated slab for sigqueue https://elixir.bootlin.com/linux/v5.5/source/kernel/signal.c …
Kraj razgovora
Novi razgovor -
-
-
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.
-
Pre-declaring static helpers is probably the least evil. But still unnecessary boilerplate and duplication (need to change 2 places).
Kraj razgovora
Novi razgovor -
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.