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] Calling a function with a self-defined type as argument
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-08-22 (14:07)
From: Remi VANICAT <vanicat@l...>
Subject: Re: [Caml-list] Calling a function with a self-defined type as argument
Oliver Bandel <> writes:

> On 22 Aug 2002, Dimitri Ara wrote:
>> Thus f x (y) means f x y and
>>      `x Line ("")' means `x Line ""'.
> OK.
> But why has the Line()-argument not a higher pruiority than the
> function-call?
> The Line()-argument is only complete, if it get's it's
> args. And the type-declaration says in detail, how to
> handle the Line().

Well, imagine that the compiler do what you want, and imagine that you
have to read a code coding from someone using strange name.

then when you read a code like :

x Azerty ""

you won't know if it is 
x (Azerty "")
(x Azerty) ""
without reading the declaration of Azerty.

Thanks to the way the language (and compiler) actually work, I can say
that it is the first solution, even if I don't know what is this
Azerty constructor.

Rémi Vanicat
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: