Slashdot Mirror


The Most Expensive One-Byte Mistake

An anonymous reader writes "Poul-Henning Kamp looks back at some of the bad decisions made in language design, specifically the C/Unix/Posix use of NUL-terminated text strings. 'The choice was really simple: Should the C language represent strings as an address + length tuple or just as the address with a magic character (NUL) marking the end? ... Using an address + length format would cost one more byte of overhead than an address + magic_marker format, and their PDP computer had limited core memory. In other words, this could have been a perfectly typical and rational IT or CS decision, like the many similar decisions we all make every day; but this one had quite atypical economic consequences.'"

3 of 594 comments (clear)

  1. Whatever by Old+Wolf · · Score: 4, Funny

    Come on , this is complete rubbish___8^)_#;3,2,.3root>^$)(^(943hellomax0984)_))1..l2l2_}[[}{

  2. Re:The Road Not Taken by billstewart · · Score: 4, Funny

    Yes, you got the author right. The trick is that in the 1920 edition, he's taking the other road...

    --

    Bill Stewart
    New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
  3. Re:The Road Not Taken by other Slashdot FPers by o'reor · · Score: 5, Funny

    I for one welcome that refreshing new way of writing "Frost's pissed."

    --
    In Soviet Russia, our new overlords are belong to all your base.