Version française
Home     About     Download     Resources     Contact us    
Browse thread
RE: [Caml-list] variant with tuple arg in pattern match?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: John Prevost <jmp@a...>
Subject: Re: [Caml-list] variant with tuple arg in pattern match?
>>>>> "bh" == Bruce Hoult <bruce@hoult.org> writes:

    bh> Multiple return values.  Unless you want to make continuations
    bh> explicit (and that doesn't seem to be what Caml folk want),
    bh> arguments in a tuple merely mirror results in a tuple.

    bh> Curried continuations ... yummm.

And this is another reason to consider functions to all be from one
value to another value.  If you want to work with tuples, fine, you
can use tuples to model multiple arguments.  You can use a tuple to
model multiple return values.  Both are actually single values.

In Scheme, where functions are considered to take and return multiple
values, you have a mess where you need special syntax to return
multiple values at once and to accept those multiple values.  This
mess exists specifically because of continuations, where a
continuation could be called with more than one argument.

In ML, where you never have more than one argument or return value, it
is simpler.  Even with continuations, you don't need a new concept of
"multiple-return-value".

John.
-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr