Re: What databases have taught me

From: Marshall <marshall.spight_at_gmail.com>
Date: 3 Jul 2006 10:39:55 -0700
Message-ID: <1151948395.664817.52330_at_b68g2000cwa.googlegroups.com>


Dmitry A. Kazakov 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? You can't say; you need more context. So consider j(k(x)). Which version of j is invoked? You can't say. Etc. You need to consider the entire expression alltogether in order to determine which version of the various component functions are used.

> Benefits are clear. You have a more regular language. There is nothing
> special in results. They are just out-parameters. You can have overloaded
> parameterless function. Consider:
>
> function Random return Natural;
> function Random return Float; -- This is legal Ada
>
> You can have abstract factory and input operations all overloaded. No
> problem:
>
> X : String := Read (File);
> Y : Integer := Read (File); -- This is legal Ada

In Java, which supports overloading on argument types, the trend over time has been *away* from doing so. (E.g. Joshua Bloch recommends against it.)

The idea is somewhat intriguing, and you make a decent case for it, but I'm not persuaded. I do agree that you've shown it's sound and consistent, however.

Marshall Received on Mon Jul 03 2006 - 19:39:55 CEST

Original text of this message