July 15, 2022 — Paul Graham—creator of Arc and Bel—started an interesting thread last month about "print() debugging".
Both experts and beginners frequently use "print() debugging".
Support for "print() debugging" is near-universal in high level programming languages. Implementations vary.
Different languages use different commands. There are a few popular patterns. Many languages have a simple global keyword like print
or echo
or puts
. Many others don't use the global namespace and you "print() debug" via a call like console.log
. Many provide multiple keywords, such as print
and println
—the latter a shortcut for printing a string followed by a \n
.
There is also a long tail distribution of how languages let you do it. Some have special syntactic sugar, such as the code golf esolang 05AB1E ("hello world
).
Below is a table of over 100 keyword(s) used to "print() debug" in over 300 languages.
You may notice there is a lack of representation of assembly languages in this list. It is often much harder to "print() debug" in low level languages than simply writing print
.