3 ms·
Indeed, but I believe, that is not the mindset of a person programming in an extremely constrained environment. Care for correctness is younger than "ls". For
by alexvoda 4y ago
Indeed, but I believe, that is not the mindset of a person programming in an extremely constrained environment. Care for correctness is younger than "ls".
For all intents and purposes at the time, it was a hack but it worked, and it worked well.
- wizofaus 4y agoI cut my teeth writing 8086 assembly code where keeping machine code size down to as few bytes as possible was necessary and that still strikes me as very lazy hack - saving a few bytes at the cost of an infinite number of possible filenames being hidden vs just two?
- GekkePrutser 4y agoCare for correctness was much more of a thing, when coding was a rare art and not a copy/paste from stack overflow to finish this week's sprint on time. There was also a lot less code in general so I would expect every line to be considered in much more detail. Also, 'laziness' tends to be a character flaw that manifests itself everywhere in a person's work, not just in one place. And Richie/Kernighan don't exactly have a bad reputation. I wonder if the '-a' parameter of ls appeared at the same time. If so it definitely wasn't an oversight.
- wizofaus 4y agoAre we sure there weren't other rules or conventions in place at the time that specified filenames had to start with an alphanumeric character?