User:JSory
Appearance
Wikipage for J.A. Sory
I write numerical software.
On Algorithm Syntax: Or Why Writing in a Popular Language is a Disservice to Humanity
[edit]If one frequents wikipedia pages dedicated to algorithms one will find that the majority of them are written in a specific language, often with the justification that it makes the algorithm easier for other programmers to implement. This is an erroneous assessment for two reasons
- It assumes that the reader would understand the programming language selected and properties exploited in the code
- It assumes that the author wrote it correctly (generally false), and encourages copy-pasting potentially erroneous code
Instead what should be done is the algorithm should be written in a pseudocode that relies on formal mathematic definitions as much as possible. Even though mathematics does have variance in syntax, it is far less ambigious than programming languages.