HACKER Q&A
📣 aniijbod

Which features of early programming languages surprisingly survived?


Which features of early programming languages surprisingly survived?


  👤 mikewarot Accepted Answer ✓
Zero terminated strings should have been one of the first things to go. Counted strings are far less error prone, can handle binary data, and can be managed.

Macro Preprocessors should have gone long ago. Having a separate layer that modifies the code before the compiler sees it greatly increases the cognitive load for the programmer.

Sentinel values such as NULL, -1, and NIL require reaching into the data flow in a manual manner to check for errors. Errors should either be a separate type (exceptions) or a separate return value outside of data.


👤 erik_seaberg
Fixed size integers that overflow silently. IEEE floats with little control over rounding. Working with single codepoints (instead of grapheme clusters). Shared mutable state.

👤 kwertyoowiyop
Semicolons to terminate statements, rather than just EOL.

👤 aniijbod
Maybe I should hesitate a little in calling Javascript an 'early' language but... NaN?

👤 taxcoder
One word - Null

👤 sys_64738
GOTO statement.