Re: Nested Relations / RVAs / NFNF

From: Mikito Harakiri <mikharakiri_at_iahu.com>
Date: Thu, 4 Nov 2004 17:55:25 -0800
Message-ID: <TiBid.35$xL.116_at_news.oracle.com>


"Tony Douglas" <tonyisyourpal_at_netscape.net> wrote in message news:bcb8c360.0411041458.396c0485_at_posting.google.com...
> For the moment I'll
> restrict myself to the naive "set of values, or equations describing
> the set of values, plus operators over them".

"or equations describing the set of values" -- this part is new to me, could you please give an example?

> The question being raised was, if we can express values like £2.63, or
> $3.75, or 2.0kg, or even 3lbs 4oz, why can't we use those values in
> programming languages and databases ? Why should we have to say things
> like kg(2.0), or (lbs 3 oz 4), or other nasty kludges ?

3lbs is a goofy way to express 3*lbs. Then, 3*lbs=lbs*3, so, I don't really see the problem.

Yet again, my perspective is symbolic manipulation, not type model. There is nothing inferior to symbolic manipulation as opposed to types. We have (in order of decreased practical significance?):

rudimentary symbolic programming environments (Lisp), more sophisticated ones (CAS), and
extremely complex ones (Theorem Provers)

> Yes, but what is the type of 2 cows + 3 cats ? Also, what are the
> types actually being handled here ? Integers, or cows and bulls ?

Animals? Seriously, in this example I don't emphasize type at all. It is the number 5 that is important.

> Is it legal to divide cows by bulls ? (Multiplication is obviously
> possible ;)

You are certainly kidding, as I can't imagine you thinking of no interpretation to ratio of males to females. And what if "Cows and Bulls" type designer didn't really thought of such method's utility? So that the users would have ask him to add such method later?

> And we probably do type-check these kinds of things, but
> it's such a low level thing we hardly notice it, until the types are
> different (e.g. work out in your head what 87.2 kilograms minus 2
> pounds 3 ounces is).

Mixing units is perfectly legal from my perspective.

> > http://tinyurl.com/68rbm
>
> On a quick read, this had the look of a kind-of clever hack to handle
> a problem that needs a fundamental review.

This idea was actually stolen from one sci.math thread.

> > This rule looks arbitrary.
>
> It isn't; if you don't do something like this, you're into the C
> hinterland of calling functions with whatever values you have to hand
> and hoping for the best. You need to do something like this to know
> that any expressions you evaluate are well typed.

Therefore, do I need type safety because my programing environment is too low level, or for some fundamental reason?

<snip> Received on Fri Nov 05 2004 - 02:55:25 CET

Original text of this message