Version française
Home     About     Download     Resources     Contact us    
Browse thread
Constante NIL
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Francois Rouaix <frouaix@l...>
Subject: Re: Constante NIL
> N'est t'il pas concevable de rajouter a Objectif Caml une constante
> NIL, UNDEF ou je sais pas trop comment la nommer dont la valeur serait
> '_a. Ceci permettrait d'initialiser "par defaut", par exemples,  les
> variables d'instances d'une classe lorsque l'on ne possede aucune
> valeur par defaut du bon type.


In this particular case (dummy initialization value for a CamlTk 
widget), you could use Widget.default_toplevel, or Widget.dummy.
It's inelegant and a bit dangerous, but neither as bad as using
a Widget.widget option type, or as drastic as adding null pointers
in the language.

--f