I am writing a paper that describes a programming language that I am developing as part of my PhD. I think that writing the paper using an example can greatly improve how the paper is understood. Is there a "standard" example that is used in programming languages paper? A set of examples?

  • 3
    Not only there are some papers, there is a whole ACM interest group for that (SIGPLAN). On that page, you will find all the relevant conferences and journals on programming languages. For example papers, browse the Proceedings of PLDI and POPL conferences. There is also OOPSLA (now called SPLASH) for more object-oriented stuff.
    – user7112
    Dec 3, 2013 at 8:18
  • 1
    It depends, of course, on what you're trying to illustrate with your example. An example of a language is the untyped lambda calculus. Some algorithms and programs that are frequent examples are at Rosetta Code. If you want to know more about what's typical in computer science, you might ask at Computer Science Stack Exchange or, if the relevance is specific to professional researchers in theoretical CS, Theoretical Computer Science Stack Exchange.
    – ajm475du
    Dec 3, 2013 at 18:28
  • It depends on what you want to show. Hello world is usually the minimum example, then Fibonacci for recursion, prime numbers in [2,100] for loops, etc. As you move to more fancy features the standardization fades (AFAIK, hopefully I'm wrong). More than focusing on a standard, I'd focus on an example that shows clearly the strengths of your language or the motivation. Finding the limitations or weaknesses is relatively easy, and frustrating, IMHO.
    – Trylks
    Jan 17, 2014 at 14:03

2 Answers 2


The biggest problem that you face when writing a programming language paper is explaining why the world needs another programming language, rather than a library or an API or something of the sort.

I would thus recommend skipping "standard" examples such as "Hello world" and recursive factorials entirely, and instead going straight to a set of minimal examples that illustrate the value of the new language. Only in the case of a particularly extreme langauge will the standard examples be necessary to help understand the scientific concepts.

Note that documenting a programming language is an entirely different matter.


It would be helpful to learn about the specific strengths of your language, since good examples should illustrate its strengths (yes, this is more a meta-answer, but maybe exactly what you should be looking for).

The standard example is printing "Hello World"; everything else depends on the language and its features. E.g. you might want to demonstrate simple database queries, easy list processing, recursion, string manipulation, logic deduction, complex mathematics, ...

You must log in to answer this question.

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