this post was submitted on 16 Jan 2026
25 points (87.9% liked)

Technology

1357 readers
26 users here now

A tech news sub for communists

founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] cornishon@lemmygrad.ml 3 points 1 week ago* (last edited 1 week ago) (1 children)

I think the simplest benevolent example of this is what I call "the newline virus".

Basically, in most programming languages you represent the newline character inside strings with the escape sequence '\n' (or equivalent), so naively you would expect to see a statement translating '\n' into its ASCII code 10 somewhere in the source code of the compiler, like this:

case "\n":
    emit(10);

but most likely, it will just say something like instead:

case "\n":
    emit('\n');

That is, the fact that '\n' == 10 is nowhere to be seen!

You only need the initial version of the compiler to state it explicitly, all future versions can rely on the previous compiler doing the right thing.

[โ€“] yogthos@lemmygrad.ml 4 points 1 week ago

yeah great example