Re: no names allowed, we serve types only

From: David BL <davidbl_at_iinet.net.au>
Date: Fri, 19 Feb 2010 00:35:37 -0800 (PST)
Message-ID: <54e0ab79-da86-486b-a31a-e96b4cb33eab_at_u15g2000prd.googlegroups.com>


On Feb 19, 1:33 pm, Tegiri Nenashi <tegirinena..._at_gmail.com> wrote:

> Types are entirely misguided approach to physical units. Much more
> elegant way is to operate units as if they are numbers, for example
> the expression 10 * kg / (10 * sec^2) is multiplication/division of 4
> number-like entities. One can use the laws of associativity/
> commutativity and reduce it to 1 * kg/sec^2.

Interesting and that does look elegant. Are you suggesting the computer manipulates these symbolic expressions so as to rearrange them into a canonical form

   value * unit

(i.e. units are moved to the right hand side of a multiplicative expression).

How does validation fit in, if it's not part of the type system? I'm guessing it's based on unification of symbolic expressions. Is that right?

I believe the design/implementation of a DBMS is normally broken up into rather distinct "layers", one of which deals with domain support (both built-in and user-defined types) and another that deals with the RM itself and treats domains as generic types.

I'm struggling to understand how a domain datatype could support units in the way you describe without the generic RM layer ending up physically recording a unit against every recorded numerical value. Obviously that's not practical.

If a numerical data type supports units then it must record the unit as part of an encoded value. If it doesn't then the unit must be associated statically with the data type itself, contrary to your claim that types are a misguided approach to physical units. Is it possible to evade that conundrum? Received on Fri Feb 19 2010 - 09:35:37 CET

Original text of this message