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
[Caml-list] default values for record field definitions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-07-19 (04:15)
From: Alexander V. Voinov <avv@q...>
Subject: [Caml-list] default values for record field definitions
Hi All,

It may well be that I'm not in the first hundred of those who proposed
this, if so - sorry :-).

Why not to introduce a syntax for default values of record fields:

type rec1 = { attr1: type1 = val1; attr2: type2; attr3: type3 = val3 }

It this case constructions of the form

let x = { attr2 = val2 } are possible, with other fields filled by val1,

Can it be done via camlp4?

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