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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,791ecb084fdaba75 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-09-29 06:21:58 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!swiss.ans.net!news.dfn.de!news.belwue.de!news.uni-stuttgart.de!iris3.csv.ica.uni-stuttgart.de!ucaa2385 From: ucaa2385@iris3.csv.ica.uni-stuttgart.de (Peter Hermann) Newsgroups: comp.lang.ada Subject: Re: Types with physical dimension Date: 29 Sep 1994 11:19:43 GMT Organization: Comp.Center (RUS), U of Stuttgart, FRG Message-ID: <36e7sf$19ql@info2.rus.uni-stuttgart.de> References: <36deok$dce@gnat.cs.nyu.edu> NNTP-Posting-Host: iris3.csv.ica.uni-stuttgart.de Date: 1994-09-29T11:19:43+00:00 List-Id: Robert Dewar (dewar@cs.nyu.edu) wrote: : "Of course it would be nice to have more direct support for units" : In the "of course" here likes a rather fundamental assumption which I : question, namely that it is always desirable to have features at hand : that do exactly what you want in the most convenient way. While that : may seem locally optimal, I am afraid that following this inclination : repeatedly leads to too much complexity in language design. Remember : that a reader must be able to read the code, that means that a reader : has to be able to pretty much understand the whole language since there : is no restriction on what the writer can write. A big language is not agreed. The reader would be "overloaded". but (see below) : so bad from the writer's point of view, since you only learn what you : need, but from the reader's point of view, the complexity is much : harder to handle. : To me, the units case crosses the line. I think you can build this well enough Because you are involved in compiler construction? ;-) :-) : in Ada, esp in Ada 9X with the abstract feature, and I think that (even : given infinite resources :-) it would be a mistake to add an additional : (inevitably somewhat complex) feature that would handle this more : directly. I don't see it necessarily as an add-on feature like another "rucksack". Ada has done a good job to prevent semantic errors. I think however, that for Ada2000+ there are still reserves which are not digged out in the abstraction process. I am feeling that there must be better methods which fit smoothly into a language concept. A good solution would bring another major step in the abstraction process. Today, we are able to prevent an expression like meter times meter giving meter. (you may substitute inch for meter :-) We may allow meter times meter giving an_area_type. The tools are here but certainly only rarely used. Did I tease your phantasy? The problem is with any language. We need some words to communicate but the optimal set is seldom reached. -- Peter Hermann Tel:+49-711-685-3611 Fax:3758 ph@csv.ica.uni-stuttgart.de Pfaffenwaldring 27, 70569 Stuttgart Uni Computeranwendungen Team Ada: "C'mon people let the world begin" (Paul McCartney)