Get the latest tech news

John Carmack on inlined code (2014)


(Here begins a comment written by John Carmack in 2014, about an email he sent to a programmers’ mailing list in 2007.)

While I can’t say that I found a hidden bug that could have caused a crash (literally…), I did find several variables that were set multiple times, a couple control flow things that looked a bit dodgy, and the final code got smaller and cleaner. At this point, I think there are some definite advantages to “style C”, but they are development process oriented, rather than discrete, quantifiable things, and they run counter to a fair amount of accepted conventional wisdom, so I am going to try and make a clear case for it. Practical factors like increased multiple checkouts of source files and including more local data in the master precompiled header forcing more full rebuilds do need to be weighed.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of john carmack

john carmack

Photo of Inlined Code

Inlined Code

Related news:

News photo

John Carmack on Meta Horizon OS

News photo

John Romero Releases New Doom Episode 'Sigil 2', Appears With John Carmack on Twitch

News photo

John Carmack and Rich Sutton partner to accelerate development of Artificial General Intelligence