Version française
Home     About     Download     Resources     Contact us    
Browse thread
Why no macros in CAML Light ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: tarizzo@w...
Subject: Why no macros in CAML Light ?

*** French translation follows ***
Hello,

Using LISP-Like language (SCHEME to be more precise), I wonder why there is
no macro facility in CAML. This would provide some syntactic sugar which
could answer some problems or suggestions encountered in caml-list (lack or
improvment of control structure, etc...)

I know that the very simple (and uniform) syntactic structure of lisp
programs permits an easy coding of complex macros, but it would be nice to
have at least in caml the equivalent of what can be found in procedural (and
compiled) languages : C for example. 

Perhaps, there are implementation problems related with the type system of
CAML, but I can't figure out what they are : the only job of a
"preprocessor" is to translate a phrase in core CAML, not to deal with types.

*****
Bonjour,

Utilisant un langage Lispien (SCHEME pour etre plus precis), je me demande
pourquoi il n'existe pas en CAML la possibilite de programmer des macros.
Cela pourrait fournir du "sucre syntaxique" afin de resoudre quelques
problemes ou suggestions rencontrees dans la liste CAML (ajout ou
amelioration des structures de controle, etc...)

Il est vrai que la syntaxe tres simple (et uniforme) de Lisp facilite le
codage de macros complexes, mais il serait agreable de disposer au moins de
l'equivalent de ce qu'on peut trouver dans les langages proceduraux (et
compilables) classiques : C par exemple.

Il existe peut-etre des problemes d'implementation lies au systeme de
verification de types de CAML, mais je ne vois pas trop lesquels : le seul
travail d'un "preprocesseur" est de traduire une phrase en CAML de base,
sans s'occuper des types.

Merci d'eclairer ma lanterne.
*********************************
 Tarizzo Martial
 Prof. Sc Physiques
 Classes preparatoires
 Lycee J MOULIN
 57600 FORBACH

 Email: tarizzo@world-net.sct.fr
        74014.3307@compuserve.com
 Compuserve : 74014,3307
*********************************