Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: -- (:)
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:  FAQ:
To unsubscribe, mail  Archives: