Xref: utzoo comp.lang.c:26909 comp.lang.misc:4453 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!pt.cs.cmu.edu!sei!firth From: firth@sei.cmu.edu (Robert Firth) Newsgroups: comp.lang.c,comp.lang.misc Subject: Re: C strongly typed? Message-ID: <6475@bd.sei.cmu.edu> Date: 14 Mar 90 21:01:15 GMT References: <259@eiffel.UUCP) <1990Mar1.172526.28683@utzoo.uucp) <849@enea.se) <1990Mar7.182230.5517@utzoo.uucp) <862@enea.se> <39941@ism780c.isc.com> <3744@tukki.jyu.fi> <3965@nmtsun.nmt.edu> Reply-To: firth@sei.cmu.edu (Robert Firth) Organization: Software Engineering Institute, Pittsburgh, PA Lines: 43 In article <3965@nmtsun.nmt.edu> al@nmtsun.nmt.edu (Al Stavely) writes: >In article <3744@tukki.jyu.fi> sakkinen@jytko.jyu.fi (Markku Sakkinen) writes: >>In article <39941@ism780c.isc.com> marv@ism780.UUCP (Marvin Rubenstein) writes: >>>I did read a paper (sorry, I don't have the reference) describing a language >>>that allowed one to augment the the type declaration with a units declaration >>>so as to be able to catch errors of this form. >> >>I think there has been more than one article in ACM SIGPLAN Notices >>during the last two or three years that has suggested such a language >>extension (to Pascal at least) in considerable detail. > > >This is a moderately good but totally obvious idea, and language constructs >for doing this have been re-invented over and over again. It's just that >no one has thought it significant enough to incorporate into a major language. Well, I know of a minor programming language that allows one to achieve most of what is required at a fairly low cost in language feature overhead. The concepts and their rationale are explained in the "Rationale for the Design of the Ada programming language", sections 7.2 and 7.3. Examples there of types with implied units are FRANC and MARK, DOLLAR and CENT, LENGTH and AREA. You might want to look it up. hit n now, rest is junk to massage some bloody fool's ego sorry i have to include more new text than quoted text so wasting your time and money