Version française
Home     About     Download     Resources     Contact us    
Browse thread
Estimating the size of the ocaml community
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] The boon of static type checking
On Mon, 2005-02-14 at 08:42, Thomas Fischbacher wrote:
> On Sun, 13 Feb 2005, Michael Walter wrote:
> 
> > Your argument regarding Lisp and O'caml ignores the fact that
> > programming languages are to a large part about syntax 
> > I feel I've mentioned that so many times it should be in some FAQ ;o)

> With a parser generator (take zebu, for example) and, say,
> SET-DISPATCH-MACRO-CHARACTER, I just as well can give you any syntax you 
> want on top of lisp.

> So, syntax just as well is "nothing more than a library".

However this indicates you're a Lisper. What you say isn't
the case for most other languages. Lisp has a trivial grammar,
as does, for example, Forth.

Ocaml does indeed have a programmable front end with
the camlp4 system, indeed pattern matches have been
extended to include regexps with 'micmatch' package
using it.

However the idea that 'pattern matching' can just be
done with a library for Ocaml is wrong AFAICS.

Pattern matching is *fundamental* because, with
the exception of a couple of library functions
(hd, tl, fst, snd etc), it is the *only* way of accessing
inductive data type destructors.

Yes of course you can write a translator converting
language A to language B, but the idea that this
is always 'just syntax' misses the point -- there
is a level of complexity in such a transformation
where your translator isn't merely 'just a syntactic
tranform' but earns the title 'compiler'.

Would you call GHC: Haskell -> C 'just syntax'?
Even Ocaml 'just produces assembler'..
Is not a term rewriting system, including the whole
lambda calculus 'just a syntactic transformer'?


-- 
John Skaller, mailto:skaller@users.sf.net
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language http://felix.sf.net