HQ9++ is an object-oriented extension of the well-known esoteric language
HQ9+, created by Cliff L. Biffle.
- Extend the elegance, simplicity, and power of HQ9+ to the object-oriented paradigm.
- Be backwards compatible with HQ9+. That is, any valid HQ9+ program will also run in HQ9++ and will produce
HQ9+ was created to make some very common programming tasks extremely straightforward. HQ9++ bulds on this strong core
functionality with the purest implementation of the object-oriented paradigm in any language.
The quintessential test of a programming language is its ability to print the statement "Hello, World!" HQ9+ naturally
allows the writing of this test program in a very efficient and straightforward manner.
99 Bottles of Beer on the Wall
A good test of a language's control flow and recursive capabilities is the ability to print the full lyrics to the
song "99 Bottles of Beer on the Wall" with code as concise as possible. HQ9+ provides the definitive standard in this test.
A quine is a program that print its own source code. In most languages this requires some very tricky programming. HQ9+
again set a new standard for this test of a programming language's capability.
HQ9++ extends HQ9+ by allowing it to define and instantiate objects. HQ9++ is a so-called pure object-oriented
language, in that all data is stored in objects - there are no simple variables such as the integers or chars which
exist in "unpure" object-oriented langages such as C++ or Java.
HQ9++ has four syntax elements:
These are combined into five different commands, described below.
Prints "Hello, world!".
Prints the entire text of the source code file.
Prints the complete canonical lyrics to "99 Bottles of Beer on the Wall".
Increments the accumulator.
When the sequence
++ is encountered, it (naturally) increments the accumulator twice, and also instantiates
an object of a new subclass of the generic superclass. In line with the best data-hiding principles, there is no way to
access this object.
- The original HQ9+ specification, by Cliff L. Biffle.
- A further extension of this amazingly versatile and useful language: HQ9+-, by melikamp.
Home | Esoteric Programming Languages
Last updated: Sunday, 20 January, 2013; 22:29:58 PST.
Copyright © 1990-2022, David Morgan-Mar. email@example.com
Hosted by: DreamHost