Given that questions may be about hypothetical languages or WIP languages, there isn't a standard syntax for giving examples. Should there be some sort of universal guideline pseudo-language that can be used for language-agnostic examples?


2 Answers 2



I think this is fundamentally impossible given the range of language models that could be in use. A syntax suitable for an example in an imperative, procedural, object-oriented language and one that is suitable for a functional, concatenative, vectorised language will be very different. Even within those spheres there will be differences too broad to bridge, or where the standard syntax obfuscates the point rather than helping.

In most cases, an on-the-fly invented pseudocode will be good enough to communicate the point being made, and probably better as it can focus on the key point in the question.

I recognise that people dumping in a screed of invented syntax from a language only they have seen before is a potential problem, but incomprehensible questions are bad questions and can be closed until they're edited into some sensible format, and questions that are just thin excuses to advertise can just be closed.

  • $\begingroup$ ... can just be closed [and deleted] $\endgroup$
    – Seggan
    Commented May 17, 2023 at 1:23
  • $\begingroup$ Seconded. It's been less than a day, and I've already needed both procedural and logic language-style code, which a single kind of pseudocode would not be able to handle. $\endgroup$
    – Pseudonym
    Commented May 17, 2023 at 1:50
  • $\begingroup$ I found the "pseudocode' in this answer on a different SE site to be very confusing, because it was not really pseudocode, and yet at the same time it had a syntax error and a missing line of pseudocode. For those reasons the title of this Meta thread was attractive to me: In the spirit of encouraging high-quality contributions, I think that saying that something is pseudocode shouldn't be a good excuse for giving incorrect code. What do you think? $\endgroup$ Commented May 30, 2023 at 21:33

I think we should follow wikipedia and not have one.

  • $\begingroup$ It would be nice if you could elaborate about why wikipedia does not have one (I.e. back up your answer with facts and references). $\endgroup$
    – starball
    Commented May 20, 2023 at 8:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .