All mainstream low-level programming languages that I know give you
direct access to blocks of computer memory, carved up in one way or
another. What if there was an entirely new way to think about the
information you store, even when programming at the bytecode level?
Rather than addressing blocks of memory, you address structured
objects that are organised in a hierarchy. You never use addresses in
the traditional sense.
Let's say, for example, you want to read the value assigned to a
variable that was created in a higher-level language. At the low
level, you would traditionally address the memory directly. When your
bytecode is compiled, the symbols are converted to addresses and the
low-level instructions directly access values of pre-defined size.
So now, imagine a low level language where, when your bytecode is
compiled, the symbols are retained as addresses in dot-notation,
addressing a hierarchy, for example:
.prose.code.default.main.i
where 'i' is the variable, 'main' is the function that contained the
variable, 'default' is the name of the module containing the function
code, and '.prose.code' is the structural container within which
modules are organised.
Now, to read the value of the variable, all you need is a low-level
instruction that traverses a hierarchy and reads well-defined
objects. Those objects can be described using a schema, let's use a
well-known standard that is already well understood today: LDAP.
Let's also make the schema fully extensible, so that new types can be
added. We'll also always call an API to encode data whenever it is
being assigned to any given type, so that any type of data can be
stored this way.
Such a language exists. It is called the PROSE Programming Language.
The low-level bytecode is all that is available at the moment as the
project is in pre-alpha. But it already provides a large collection
of assembly instructions (PROSE Assembly Language, or PAL) that can be
assembled directly into the bytecode, and an engine that interprets
that bytecode.
If this is at all intriguing to you, I invite you to take a look at a
couple of PAL tutorials that demonstrate this functionality. The
first introduces the hierarchy and schema:
http://sourceforge.net/apps/mediawiki/prose/index.php?title=Objects,_classes_and_attributes
The second demonstrates creating functions, using variables, and
integrating with the GMP library for arbitrary precision arithmetic:
http://sourceforge.net/apps/mediawiki/prose/index.php?title=An_arbitrary-precision_calculator
There are also UNIX man pages available for every assembly instruction
that can be used with the PROSE engine. They can be viewed here:
http://prose.sourceforge.net/man/
Regards,
Mark.