"Taking a null program to a whole
The programming language
Unnecessary is an esoteric programming language. The language is named
'Unnecessary' because of the method this programming language works:
the source file is unnecessary; in fact the existence of source code
leads to critical error. In case of critical error the interpreter must
stop immediately and report the error.
Unnecessary has no instructions/commands. You can do nothing
with this language, so using it is unnecessary as well. The whole
Unnecessary program is NOP. Or actually, there should be no Unnecessary
programs, since only valid Unnecessary program is a non-existing source
The goal was to create a programming language that is easy to learn,
not very useful, doesn't require input or do output, has no memory, has
no instructions. Only an interpreter is required. As well, good thing
is that distributing Unnecessary programs is extremely easy, and can be
done without computers. As well, storage is no problem: you can have
infinite amount of Unnecessary programs in a memory bit. Actually,
storing them requires less memory than a bit.
Every valid program, however, is a quine. That's the only possible
program, and the only valid form of program. In Unnecessary creating a
null quine doesn't even require the existence of the empty program
file, as in other languages. Has programming ever been easier? (Not to
mention that it isn't even possible to write anything else than
Oh, and the valid Unnecessary program file extension is "unn".
An Unnecessary interpreter must stop and report and error if a source
file is found.
The interpreter can't do anything else, except print its own texts,
that are debug messages for example.
Here's an Unnecessary interpreter written in Python. It includes debug
command that can be toggled by writing "-debug" before the name of the
source code file. You can download the interpreter here.
You can download an example program here.
You should receive a 404 error. But that is naturally only a good
since an Unnecessary program isn't supposed to be existing. ;)
In case someone wants to write a compiler, it should do the following:
1. Check that the source file doesn't exist.
2. If there was no source file, then it should build a program that
does NOP in the language the compiler compiles it to.
~ Keymaker, 15.6.2005