|
|
|
|
|
by mitthrowaway2
1111 days ago
|
|
Code is a more restrictive space than prose. Prose has to be grammatical and meaningful, but code has to compile and efficiently serve a useful specification. The central idea of programming languages is that the grammar is very restrictive compared to natural languages. It's quite likely that, with the exception of variable names and whitespace, some function you wrote to implement a circular buffer is coincidentally identical to code that exists in Sony's or Lockheed Martin's codebases. Plus there's the birthday problem -- coincidences can happen way more than you expect. And even with prose, constraints like non-fiction can narrow things down quickly. If everyone on HN had to write a theee-sentence summary of, say, how a bicycle works, there would probably be coincidentally identical summaries. |
|
Even if a programming grammar is more restrictive, there’s some length where things become almost certainly unique.