Prism Metaprogramming Tool released
24 Oct 1999 04:22:49 +0200
>>>>> "Jim" == Jim Little <email@example.com> writes:
Jim> Prism development will proceed in four phases: * The "assembly
Jim> language" phase. * The "modern language" phase. * The
Jim> "domain-specific language" phase. * The "TUNES" phase.
Jim> During each phase, we shall extend the Prism environment to
Jim> support new interoperable languages. In the first phase, we'll
Jim> teach Prism how to add and subtract. In the second phase,
Jim> we'll add interoperable structured and object-oriented
Jim> languages. In the third, we'll add domain-specific languages
Jim> such as a GUI language, a database language, etc. And in the
Jim> last phase, we'll extend the "language" paradigm to include
Jim> "interactive languages" like spreadsheets, word processors, and
Jim> other tools. At that point, there will be no difference
Jim> between using and programming the computer, and we will have
Jim> achieved TUNES' goals as I understand them.
Is it real necessary to have these 4 phases ? Why should we define
integer arithmetics before object orientation ?
Jim> Here's the detailed plan for the first phase and the beginning
Jim> of the second: * Create a parser for integers * Create programs
Jim> to do integer arithmetic
To be honest, integer arithmetic is alsmost the first thing I've done
with OIL :-). But I didn't have to create a parser. I'll probably do
one in the future, but it is not required. To avoid the parser, I just
defined two functions bin2int and int2bin, to convert from list of `0'
and `1' to integers, and vice-versa. Therefore, the user can type :
add [bin2int (1 1)] [bin2int (1 0 1)]
=> 10096 = (1 0 0 0)
(Yes I kow, the syntax is very unsual).
10094 is the OID of the number 8, whose binary representation is the
list (1 0 0 0).
So we can do an addition without having to parse integers.