Re: Why Oracle is st00pid:
Date: 14 Dec 2002 16:02:09 +1100
Message-ID: <87znr9uram.fsf_at_tiger.rapttech.com.au>
sureucanspaamme_at_hotmail.com (Johnny Random) writes:
> I would love to bitch slap the idiot that wrote this:
> "It is poor programming practice to have a function return multiple
> values."
>
> Gee, by that same token it must be "poor programming practice" for a
> query to return multiple rows, or multiple records for that matter.
> Apparently a function should just return 1 or 0. Then you can use
> another function to string the 0's and 1's together, then another
> function to convert them to hex, then another to convert them to
> ASCII, then another to concatinate all the values, then another
> un-concatinate the values, and finally one to bitch slap the moron
> that is so f'ing stupid that he can't see the need for a function to
> return multiple values. And that ladies and genitalmens is why Oracle
> is st00pid...
Nice bit of flame bait - I'll bite!
- Name me a language where functions return more than one value? C - no, C++ - no, Pascal - no, Perl - no, Java - no, Lisp - no. I cannot think of any.
- In oracle, just like in all of the above mentioned languages, if you need to return multiple values, you just accumulate those values in some other single structure and return that e.g. a record type, a collection type etc.
- If you did have a language which can return multiple values, how do you assign them if you do not know how many values will be returned?