Usenet.com

www.Usenet.com

Group Index

Comp Thread Archive from Usenet.com

<-- __Chronological__ --> <-- __Thread__ -->

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





Marshall Spight wrote:
"Bob Badour" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]

"Marshall Spight" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]

"Bob Badour" <[EMAIL PROTECTED]> wrote in message

news:[EMAIL PROTECTED]


"Marshall Spight" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]

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









<-- __Chronological__ --> <-- __Thread__ -->


Usenet.com



Please check out one of the premium Usenet Newsgroup Service Providers below for access to Usenet.