English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
OCamlDuce 3.08.4
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-08-26 (23:21)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] OCamlDuce 3.08.4
On Fri, 2005-08-26 at 19:05 +0200, Alain Frisch wrote:

> For what concerns John's question about the integration of OCamlDuce in 
> OCaml, there are many answers. 

.. and time to explore them. I wasn't trying to suggest the merger
should be done tomorrow (hence Ocaml 4.0 number ..)

>  3) OCaml is a general purpose language, and the extension adds support for 
> a specific domain 

Tree pattern matching isn't all that specific is it?

I mean one could argue regular patterns are a 'specific domain' ..
but one would be missing the fact the finite state automata are
in the basis of computing.

Ocaml can't even do regular matching, how on earth you could
call it a 'pattern matching language' I don't know. Yet CDuce
is already extending patterns well beyond mere regular matches
by providing fairly strong capturing ability.

> constraint of being able to compile any existing OCaml program with 
> OCamlDuce, for instance, resulted in the introduction of explicit 
> delimiters {{..}} for all the new constructions, which is syntactically 
> heavy 

meaning {{ UGLY }} .. yes, it is ghastly.

> and theoretically useless.  5) It's too early to say whether 
> OCamlDuce is useful or not compared to a simpler solution with two 
> compilers (OCaml, CDuce).

Agree. However, whenever you have two tools you have to join them
together somehow. One way of doing that is with Unix scripting,
shell scripts and the like. This is very ugly and non-portable,
but can usually be got to work. 

For example, using ocamllex/yacc is just horrible in practice,
in Felix compiler there are so many files just to glue them
together .. 

.. in Felix language itself both lexer and parser
tools are built in to the language and the compiler does the gluing.

Camlp4 provides some interesting ways to glue things in a much
more structured way than Unix script.

John Skaller <skaller at users dot sourceforge dot net>