|
|
|
|
|
by hansvm
1219 days ago
|
|
I mean, there are (2^32)^(2^32) functions matching (int)->int, and many of them are both important and vastly more complicated if you ramrod them into a "types uniquely define behavior" mindset. Such issues become more common as code grows more complicated. You can alleviate a ton of problems by using the type system to assert a list is sorted or a string is HTML-escaped or whatever, but the general case is both very much not solved and not reasonably solvable. |
|
In natural language, it might suffice to say "implement multiplication", but this is because it _knows_ what multiplication is beforehand. If it did not, and only knew how to code, you would effectively have to restate the exact same properties. This will more often be the case when you're not dealing with trivial examples.