Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: [Caml-list] syntax
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Achim Blumensath <blume@d...>
Subject: Re: [Caml-list] syntax
Hello,

On Tue, Feb 05, 2002 at 01:47:31PM -0800, Michael Vanier wrote:
> I've looked at the revised syntax, and I like most of what I see (except
> for the use of x.val instead of !x).

Since I also dislike the syntax for references, I wrote the following
parser extension:

open Pcaml;

EXTEND
  expr: LEVEL "~-"
  [ [ "!"; x = expr -> <:expr< $x$.val >> ] ];
END;

That way, I can write

  !x := !x + 1

which IMHO combines the benefites of both syntaxes.

Achim
-- 
________________________________________________________________________
                                                              | \_____/ |
   Achim Blumensath                                          \O/ \___/\ |
   Mathematische Grundlagen der Informatik                   =o=  \ /\ \|
   www-mgi.informatik.rwth-aachen.de/~blume                  /"\   o----|
____________________________________________________________________\___|
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr