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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,42e401e32683b965 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!k33g2000yqc.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: A new notion: stronglly-typed-by-user language Date: Fri, 16 Apr 2010 13:50:07 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: 81.62.177.65 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1271451007 2032 127.0.0.1 (16 Apr 2010 20:50:07 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 16 Apr 2010 20:50:07 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k33g2000yqc.googlegroups.com; posting-host=81.62.177.65; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:10027 Date: 2010-04-16T13:50:07-07:00 List-Id: On 16 Kwi, 22:20, "J-P. Rosen" wrote: > Maciej Sobczak a =E9crit :> So which C++ language features exactly make i= t not strongly typed? > > 1) Lack of user-defined elementary types This is addressed by: http://www.msobczak.com/prog/typegen/ Alternative solutions involve templates or preprocessor or even hand- written classes with appropriate operations - all of them are purely C+ +-based. > 2) Type promotion I don't see how type promotion violates the strong type safety. In particular, type promotions are used in read-only operations (that is, type is promoted when the value is read, not when it is written), so they do not modify the state of the object that is subject to promotion - as such, they do not subvert the type system in any way. What about promoting integer values to Type'Base in arithmetic operations? Isn't it a form of type promotion? -- Maciej Sobczak * http://www.inspirel.com YAMI4 - Messaging Solution for Distributed Systems http://www.inspirel.com/yami4