Re: What databases have taught me
From: Dmitry A. Kazakov <mailbox_at_dmitry-kazakov.de>
Date: Mon, 3 Jul 2006 20:42:46 +0200
Message-ID: <1b31s5r3pfhua$.gjux4timzpn8.dlg_at_40tude.net>
>
> Well, there are certainly *some*.
>
> Consider composition.
>
> f(g(h(i(j(k(x))))));
>
> Consider the subexpression k(x). Which version of k is invoked?
Date: Mon, 3 Jul 2006 20:42:46 +0200
Message-ID: <1b31s5r3pfhua$.gjux4timzpn8.dlg_at_40tude.net>
On 3 Jul 2006 10:39:55 -0700, Marshall wrote:
>> On 1 Jul 2006 11:40:11 -0700, Marshall wrote: >> >>> So, the probems with this approach are pretty well-known. >>> Can you say what you consider to be the benefits? And >>> perhaps also why these benefits outweigh the costs? >> >> As for costs, well, I really don't know if there are any.
>
> Well, there are certainly *some*.
>
> Consider composition.
>
> f(g(h(i(j(k(x))))));
>
> Consider the subexpression k(x). Which version of k is invoked?
Huh, consider f(...), which version of f it is? You can't tell without reading it from right to left. It is a double-edged argument. Most people read programs "big-endian". You have a difficult job to convince them to reverse Polish:
((((x)k)j)i)...
I think it is just better to avoid deep nesting. Then, overloading when "inventively" used can make any program unreadable anyway.
-- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.deReceived on Mon Jul 03 2006 - 20:42:46 CEST