info-sather
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exceptions


From: Norbert Nemec
Subject: Re: Exceptions
Date: Wed, 11 Oct 2000 07:57:48 +0200
User-agent: Mutt/1.0.1i

On Tue, Oct 10, 2000 at 09:31:03PM +0000, Charles Hixson wrote:
> 4) allow a routine to return multiple values.
>    4a) insist that the routine return multiple values

You mean like returning tuples in other languages? Neat feature, but we 
don't have it in Sather and it would be overkill to implement it just 
for error-handling :-)

When really needed, the feature can simply be emulated by packing up 
the return type in a new class or by using out-arguments.

Anyhow: Effectively, it would just match (2), only that you would 
extend the set of possible return values. Still, the user would have to 
check after the call whether it was successful.

> > (2) Let the method return a special value (like "void") in case of such
> > an execution.

Ciao,
Nobbi

-- 
-- ______________________________________________________
-- JESUS CHRIST IS LORD!
--          To Him, even that machine here has to obey...
--
-- _________________________________Norbert "Nobbi" Nemec
-- Hindenburgstr. 44  ...  D-91054 Erlangen  ...  Germany
-- eMail: <address@hidden>   Tel: +49-(0)-9131-204180



reply via email to

[Prev in Thread] Current Thread [Next in Thread]