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-Thread: 103376,c1400b61b3f80c1e X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!x30g2000hsd.googlegroups.com!not-for-mail From: gpriv@axonx.com Newsgroups: comp.lang.ada Subject: Re: Are there noticable differences in Ada acceptance by country? Date: Thu, 20 Mar 2008 14:17:57 -0700 (PDT) Organization: http://groups.google.com Message-ID: <2f63ba9b-3a0f-43c4-a780-62caa129dc5f@x30g2000hsd.googlegroups.com> References: <87d4pr6413.fsf@ludovic-brenta.org> <47e0fc15$0$89167$157c6196@dreader1.cybercity.dk> <13u2t1a2s141531@corp.supernews.com> <1fac7b25-a11f-4199-97ad-45688318e424@u69g2000hse.googlegroups.com> NNTP-Posting-Host: 151.196.71.114 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1206047877 14985 127.0.0.1 (20 Mar 2008 21:17:57 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 20 Mar 2008 21:17:57 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: x30g2000hsd.googlegroups.com; posting-host=151.196.71.114; posting-account=YaY8rAoAAAAAnFXOECY3BGVJsrvFJCgy User-Agent: G2/1.0 X-HTTP-Via: 1.1 SPARKS X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:20514 Date: 2008-03-20T14:17:57-07:00 List-Id: On Mar 20, 4:22 pm, Simon Wright wrote: > gp...@axonx.com writes: > > I think strong typing should not be dismissed. Unfortunately Java- > > based (and C/C++/C#) courses don't explain to students that X and Y > > coordinates being fundamentally integer (or float) types are not the > > same thing. > > I always disliked an X binding which had (sub)types for X, Y > coordinates. Wrong level of abstraction, I thought: use something like > > type Position is record > X : Float; > Y : Float; > end record; > > and you get a _lot_ less scope for confusion. > > --S Well, it won't prevent someone to do: P1.X := P2.Y; To make may point clear, let's say: type Temperature_Type is new Float; is not the same entity as type Speed_Type is new Float; and I find it useful to be able to express that in the programming language. George.