Re: Why Oracle is st00pid:

From: Dmitri Ivanov <di24va56nov_at_aha.ru-Digits-for-spammers>
Date: Mon, 16 Dec 2002 09:08:35 +0300
Message-ID: <atjsgf$e33$1_at_news.aha.ru>


Hello,

"Tim X" <timx_at_spamto.devnul.com> wrote:

TX> | ...snip...|
TX> Nice bit of flame bait - I'll bite!
TX>
TX> 1. Name me a language where functions return more than one value?
TX> C - no, C++ - no, Pascal - no, Perl - no, Java - no, Lisp - no.
TX> I cannot think of any.

You are definitely unaware about Lisp. Common Lisp, the most popular dialect now, has had multiple values mechanism for ages. The feature include constructs for both returning and accepting multiple values.

TX> 2. In oracle, just like in all of the above mentioned languages, if
TX>    you need to return multiple values, you just accumulate those
TX>    values in some other single structure and return that e.g. a
TX>    record type, a collection type etc.
TX>
TX> 3. If you did have a language which can return multiple values, how
TX> do
TX>    you assign them if you do not know how many values will be
TX> returned?

In Common Lisp, excessive values are ignored. OTOH if the function returns less values than the caller expects, the caller defaults other variables (or places) by NILs.

Everyone can take a look at http://www.harlequin.com/books/HyperSpec/

---
Sincerely,
Dmitri Ivanov
www.aha.ru/~divanov
Received on Mon Dec 16 2002 - 07:08:35 CET

Original text of this message