GEN,HLL+ [far25]

Francois-Rene Rideau rideau@clipper
Wed, 31 Mar 93 5:27:21 MET DST


 I'd like to regularly post a list of pros and cons about a new language,
and its features. Here I compare to C++.



C/C++
~~~~~
Advantages:
1- We already know this language, and don't have to readapt to another
language syntax (see New Language Disadvantage 1)
2- We can test language functions immediately, without having to wait
for the kernel to be done (see Disadvantages 4)

Disadvantages:
1- does not include code as a standard object, thus creating a boundary
between using and programming. You can't both program and use at the
same time. That's the opposite of user programmer/user friendliness
(see HP calculators, which despite their lack of power, are much more
usable than my unix workstation, because code IS an object as anything
on the HP).
2- is not a structured language: procedures are all global; that's why
C/C++ will NEVER allow having independent light threads, and why it's
impossible to have a lightweight multitasking system under C/C++.
You may notice that this point is related to the preceding remark:
if procedure were objects, you could include them individually inside
thread objects, then each thread would have its own independent code.
3- C++ know only early binding (i.e., it only compiles directly executable
code), hardly knows about dynamic library linking (that's not a language
transparent feature; only a linker feature); C/C++ considers a program
to be complete, finished, and run in the absolute without interaction
with other programs, but through the system; that's why all ROI in C
must be explicitly done through system calls !!!
4- The "we won't have to rewrite a compiler" argument doesn't stand: if
the system is to be OOed, we'll have to adapt the compiler so as it produce
system requirements complying OO code. Thus, we can easily use code
language code that don't use the kernel, but adapting the compiler output
code to fit kernel requirements will be such that it's difficult to
test programs with the Kernel !
5- As it's a low-level language, either we'll have to have low-level specs
for the OS (as with Unix), so that we can't adapt to an architecture
different from that for the which the OS was designed; or we'll have to
rewrite a great amount of the C/C++ code on each system adaptation.
So we lose either system functionality, or language portability.


New Language
~~~~~~~~~~~~
Disadvantages:
1- we have to relearn a new language syntax (see New language advantage 1).
2- we have to debug the language specifications as we use it.
3- we have to write a full compiler for it.

Requirements
1- may be quickly (semi-)compiled at the same time as written, and
intermediate LLL code can be efficiently interpreted.
2- everything is an object, including code, including classes.
3 - parallelism is included in simple language constructs (not
so hard to build from executable code being object).
4- Meta programming easy in the language: the compiler is its own
preprocessor; the language is its own macro-command language.

Advantages:
1- We can design the syntax to fit our needs and ideas, so that it's
much easier to use. Moerover, even C isn't our natural language, and
whatever language we use, there will have been adaptating time to use
it.
2- We can correct the lacks of any existing language we would have used.
3- Portability: both the system and the language will be as easy to
port. All you need do is writing a LLL back-end compiler and
hardware specific lolos.
4- The language is perfectly is adapted to the system. No need of bizarre
and slow language -> system call translation.
5- being able to be interpreted, it serves as a shell language as
well as a programming language; being powerful, and easy to specialize
via standard libraries, it also replaces small utility languages
(sed, awk, perl, etc); finally, being high-level and knowing of
relations between objects, it is easily adaptated to an AI language.
So there is no more need to learn a different language for every
application; the same language is used for (almost) everything; no
more need to learn new syntaxes each time.


This isn't finished, but I post it as well. Feel free to add your
comments.

   ,
Fare


PS: BTW, did anyone receive my [far23] message ? I didn't, so perhaps
I posted it only to one person (is it you, Andreas ?), and not to the
whole mailing-list. It wasn't a fundamental article, but I'd like not
to write it again nevertheless.