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,9d303864ae4c70ad X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-04-10 06:07:55 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: wojtek@power.com.pl (Wojtek Narczynski) Newsgroups: comp.lang.ada Subject: Re: Expressing physical units (Was: Reprise: 'in out' parameters for functions) Date: 10 Apr 2004 06:07:55 -0700 Organization: http://groups.google.com Message-ID: <5ad0dd8a.0404100507.729d3577@posting.google.com> References: <5ad0dd8a.0404090512.15af2908@posting.google.com> NNTP-Posting-Host: 83.27.22.36 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1081602475 3903 127.0.0.1 (10 Apr 2004 13:07:55 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 10 Apr 2004 13:07:55 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:6948 Date: 2004-04-10T06:07:55-07:00 List-Id: Jacob, > The type system is not _unable_ to express physical units. It just > has some limitations in how you can do it. It depends on how exactly you phrase out the task. If you define it as having a static check on physical units, I believe Ada type system is not able to do this. You are left with paper and pencil. > And although I am annoyed by the limitations, I still haven't seen > a description of how the language can make it easier, without introducing > problems outweighing the benefits. I have tried to formulate such > a modification to Ada myself, but ended up with something that appeared > to be (provably) impossible to compile. (I converged your note here) I find this subject fascinating. I remember matchcad doing units check for me 10 years ago when I was in secondary school, yet I have not seen any compiler capable of doing the same. I was thinking that a term rewriting system for partial evaluation of the program would do the job. Or maybe are there problems with modularization? Could you point me at your results, if they are public? >> But the problem real problem IMO is that the development of the >> language has stagnated. > > What to one programmer appears as stagnation, appears as stability > to another programmer. Point taken. > It is fine to use GNAT to do experiments with possible changes to > Ada. I was trying, but it turned out that I am not smart enough. The codebase is just too large for me to comprehend. For example the (in)famous 'in out' for functions. I really have no idea where to look at in those megabytes. I had hoped that maybe GPS as a code comprehension aid, would help, but GNAT seems to be too large for GPS, which I find a bit ironic. Regards, Wojtek