From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fe9ec916c5bbbd59 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-17 04:49:08 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!tar-alcarin.cbb-automation.DE!not-for-mail From: dmitry@elros.cbb-automation.de (Dmitry A. Kazakov) Newsgroups: comp.lang.ada Subject: Re: Consider her way -- Re: Dimensionality Checking Date: Mon, 17 Dec 2001 12:49:06 GMT Message-ID: <3c1de72a.15951203@News.CIS.DFN.DE> References: NNTP-Posting-Host: tar-alcarin.cbb-automation.de (212.79.194.111) X-Trace: fu-berlin.de 1008593347 16938645 212.79.194.111 (16 [77047]) X-Newsreader: Forte Free Agent 1.21/32.243 Xref: archiver1.google.com comp.lang.ada:17997 Date: 2001-12-17T12:49:06+00:00 List-Id: On Sat, 15 Dec 2001 05:24:53 +0300 (MSK), "Alexandre E. Kopilovitch" wrote: >>Well, what is a "value"? :-) > >No problem. Let us be slightly more formal: "a type is an ordered pair of the >sets; the elements of the first set are called the values of this type; the >elements of the second set are subroutines, and they are called the operations >of this type". >>The concept of >>unit, like that of value, is not "definable" in the language, but that is >>not necessary. You're getting all philosophical about it and making it >>harder than it really is :-). But I certainly do see an abstraction in units... > >In such a case, perhaps you are able to describe - more or less formally - >that abstraction, which you see here? What about this: Unit of a type is a sort of type tag. The operations +,-,*,/,** are dispatching operations on tuples of arguments and the result [=multiple dispatch]. Valid combinations produce a value. Invalid combinations raise Unit_Error. Regards, Dmitry Kazakov