Re: If you were to implement the original relation algebra language...

From: Amund Trovåg <st08661_at_rasmus.uib.no>
Date: Mon, 24 Nov 2003 10:37:00 +0100
Message-ID: <bpsjfl$1pd4$1_at_toralf.uib.no>


Marshall Spight wrote:
> "Bob Badour" <bbadour_at_golden.net> wrote in message news:J-6dnYasYqxNl12iRVn-tA@golden.net...
>

>>"Marshall Spight" <mspight_at_dnai.com> wrote in message
>>news:AETvb.279515$Tr4.859792_at_attbi_s03...
>>
>>>"Bob Badour" <bbadour_at_golden.net> wrote in message
>>
>>news:m_2dnes63Z0zKSKiRVn-vg_at_golden.net...
>>
>>>>"Marshall Spight" <mspight_at_dnai.com> wrote in message
>>>>news:Q6Ovb.208724$275.779602_at_attbi_s53...
>>>>
>>>>>I think we would be better off providing the language with enough
>>>>>flexibility so that the programmer can choose the most appropriate
>>>>>form of expression at the time. cf. Haskell.
>>>>
>>>>Are you suggesting you prefer redundant languages?
>>>
>>>Sometimes I have trouble understanding what you mean
>>>because you are so very terse.
>>
>>You seem to have understood well enough.

>
>
> Sure. But I have to guess what you mean sometimes, and
> sometimes I guess wrong. I think what I was trying to say
> was, forgive me if I guess wrong this time.
>
>
>
>>>I'm happy giving the programmer the flexibility to pick the right
>>>syntax for the current context. YMMV.
>>
>>Fair enough. What contexts favour prefix and what contexts favour infix?

>
>
> I generally reserve infix notation for binary operators that are traditionally
> infix in math textbooks. I suspect, but have not investigated, that
> the operators of the relational algebra would work well in infix form.
>
> Simplistic example with union:
> (use your imagination with the uppercase U :-)
>
> A U B U C
> is decidedly better than
> union(union(a, b), c)
> and possibly better than
> union(a, b, c)
Why is "union(union(a, b), c)" worse than the others? From a user's perspective I can see that one might be skeptical about its ease-of-use...however, do yo have any research saying that that one is decidedly better than the other?
Oh, and if the rel alg is written like this union(union(a, b), c), the method signature would be easy: public Relation union(R1, R2){return resultrelation;}
>
> The last one is interesting, but for full generality, it would need
> to accept a variable number of arguments, and I'm suspicious of
> vararg functions.
>
>
> Marshall
>
>
>
>
Received on Mon Nov 24 2003 - 10:37:00 CET

Original text of this message