Sleeping? Language Design.
Tue, 13 Jan 1998 11:56:12 +0100 (CET)
Dear OS listers,
as of language design, I'd recommend all of you to learn a lot about
other languages than C, Pascal, and look-alikes, before you start
designing your own. I particularly recommend the study of such languages
as LISP and ML dialects (the main ones are Scheme and CommonLISP for LISP,
OCaml and SML for ML), and if you have time, perhaps even study pure
functional languages like Haskell and Clean. A completely different approach
is logic programming, for which there exist LISP modules, or specialized
languages such as the Prolog family, or its more elaborate cousins like
Mercury or Goedel. There are lots of other languages of interest, like
Forth, Perl, Icon, and many more. Not to talk about parallel programming,
be it as explicit constructs (OCaml, some LISPs, etc), or as implicit
properties of the language (Clean, some LISPs, SISAL, Occam, etc).
I don't even count libraries that help manually simulate parallel programming
in low-level languages like C as real automatic parallel programming,
though their study might be interesting *as ways to implement the above
parallel programming models*.
The matter is not to learn languages for the sake of knowing many of them,
but for the sake of groking the *concepts* that lie in each of them,
and that sometimes just can't be imagined with other languages, particularly,
with stubborn inexpressive languages like BASIC, Pascal, C.
Why reinvent an approximate plain wood wheel, when there already exists
structured steel wheels with pneumatic tires? Why fall again in ever the
same traps, when they already have been discovered and marked?
Ignoring history is just having to redo it from the beginning.
Not that *everything* good has been done already,
but that even if you have original ideas, if you can't benefit of modern
ideas, you'll have to express them in primitive forms, with lots of
difficulties and errors, which will hide to you as well as to most everyone
the real original part of your design in a shitload of crap and inessential
burdensome details that are well-known features or bugs.
>: Jimmy Kerl
> o The value of a language is based upon 2 things:
> 1. Extensibility of the language. -- Being able to define
> user defined types, functions and other identifers.
> 2. The ability of the Language to interact with the operating system.
> A language must do BOTH of these well to be a good language.
I'd fully agree, but these are too informal requirements, and the real
problem is precisely to formalize what is to "do well" about these,
or else every single turing tar pit with I/O will do.
> o All control-structures have a corresponding data-structure and vice versa.
You might like to investigate such things as the formal theory of types
and of induction; if you do, you'll see that this vague idea of yours
(that anyone who's studied programming has remarked) can be well-formalized:
every inductive type has an induction principle, that, by the
Curry-Howard isomorphism, can be associated to a (higher-order) function,
which is exactly your correspondance (once you stop thinking in terms
of low-level "control structures", but understand the concepts of higher-order
functions and continuations).
> Oh 1 more thing: the latest thing i have been considering is trying to write a
> compiler such that the IF/then's, arrays, etc are preliminary values in the symbol
> table, and not coded directly into the procedures of the compiler.
You're just reinventing a stubborn version of LISP. Stop it, and do get the
real thing, LISP. Or else, do learn the real theory of languages and grammars,
and do use the current language best suited to (efficiently) manipulate
them, OCaml (see also the pre-processor-pretty-printer for it, camlp4).
Again, this is not gratuitous criticism. Anyone who's passionate about
language design should be able to do something original; the problem is
that something that's original with respect to a primitive notion of
computing is most likely to be a long-known thing; if you want to be
original with respect to modern, elaborate, notions of computing, do
learn them. We're in 1998, not in 1968. Don't do 1968 computing!
All in all, see
And if there's only one book to read, let it be the SICP
[Note: I cc'ed the Tunes list]
== Faré -=- (FR) François-René Rideau -=- (VN) Ð£ng-Vû Bân -=- email@example.com ==
Join a project for a free reflective computing system! | 6 rue Augustin Thierry
TUNES is a Useful, Not Expedient System. | 75019 PARIS FRANCE
http://www.eleves.ens.fr:8080/home/rideau/Tunes/ -=- Reflection&Cybernethics ==