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
syntax bug: copying records
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-12-21 (05:22)
From: skaller <skaller@u...>
Subject: syntax bug: copying records
If x is a record then { x } should be a copy of it. But this
doesn't work, I am using this ugly workaround instead:

{ x with dummy_field = x.dummy_field }

Surely there is a better way? 

Oo.copy doesn't work either. Yes, yes, imperative programming
sucks but I'm using the standard Lexing stuff.

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net