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

From: Marshall Spight <mspight_at_dnai.com>
Date: Sun, 23 Nov 2003 06:56:05 GMT
Message-ID: <9SYvb.214199$ao4.761829_at_attbi_s51>


"Bob Badour" <bbadour_at_golden.net> wrote in message news:J-6dnYasYqxNl12iRVn-tA_at_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)

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 Sun Nov 23 2003 - 07:56:05 CET

Original text of this message