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] Optional arguments in inherited methods
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-04-29 (08:11)
From: Henri DF <henri.dubois-ferriere@e...>
Subject: Re: [Caml-list] Optional arguments in inherited methods
> Unfortunate, but in the case of optional arguments the problem is
> not with typing but with how they are implemented: an optional
> argument of type [t] is actually a non-optional argument of type [t
> option]. They disappear automagically on application, but this means
> that None's are automatically inserted. So applying a function which has
> optional arguments is completely different from a function without
> them (even if the function call looks the same in your source code).

what about optional arguments which have a default value? i would assume 
these are not implemented using options, so would that change anything 


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: