Daniel Lemire's blog

, 4 min read

Everything is pseudocode

5 thoughts on “Everything is pseudocode”

  1. Peter Boothe says:

    Isn’t that a problem with Java and not a problem with expressing things in code?

  2. D. Eppstein says:

    The distinction between code and pseudocode is much smaller if you use Python instead of Java.

  3. Java is certainly a terrible choice, but I think that ambiguities in communication are important. See for example my post Formal definitions are less useful than you think.

    Do you really want to be worried about what x=y means?

    Pseudocode is better at letting ambiguities through.

  4. Peter Boothe says:

    Ambiguity is fine – in the face of ambiguity, it often suffices to simply choose one way or the other and move forwards. Indeed, that’s a large part of how languages like Python and Ruby gain their conciseness. This feels like it relates to Marvin Minsky’s essay “Why Programming Is a Good Medium for Expressing Poorly-Understood and Sloppily-Formulated Ideas”, which points out that our mad desire for precision in all things at all points in programming languages is a cultural artifact, and not necessarily required. I think you are right that Java for all things would be horrible, but an interpreter that took in pseudocode and usually did the right thing would be fantastic! If it occasionally screwed up, that’s fine, as long as the code was as understandable as possible. More things being executable instead of descriptions of an executable sounds like a good way to make lots of progress quickly.

  5. Hi Professor,

    I could not reach the PDF you link at the end of your post. May there be a problem with the link?

    Best regards