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,42e401e32683b965 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII X-FeedAbuse: http://nntpfeed.proxad.net/abuse.pl feeded by 88.191.16.109 Path: g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!nntpfeed.proxad.net!nospam.fr.eu.org!usenet-fr.net!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeder.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: A new notion: stronglly-typed-by-user language Date: Sun, 18 Apr 2010 10:04:24 +0200 Organization: Adalog Message-ID: References: <57119c7d-eb78-4904-a2de-bf183b03ccf0@r18g2000yqd.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Injection-Date: Sun, 18 Apr 2010 08:04:28 +0000 (UTC) Injection-Info: feeder.eternal-september.org; posting-host="kZ9opF+cDP7YxlUj7fm+2w"; logging-data="6734"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+boQpwTvm42jmNktFCeW0A" User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) In-Reply-To: Cancel-Lock: sha1:CPl+nuHahu5x/elYSicpeCFo7aw= Xref: g2news1.google.com comp.lang.ada:10051 Date: 2010-04-18T10:04:24+02:00 List-Id: Maciej Sobczak a �crit : [..] > No. Not only it is not logical - it will not even compile. > [...] > Your example above cannot compile, because the actual parameter int > cannot be promoted to long (int is never promoted, only "lower" types > are) and its conversion to either short or long has equal rank - > therefore the call is ambiguous. > > This has *nothing* to do with representation - these types are all > different even if they have the same representation. > [...] > Overload resolution does *not* depend on implementation in C++, it is > precisely defined with no relation to representation. I admit my C++ is a bit old, based mainly on Stroustrup where I picked this example from. Is current C++ differs, it is a good thing, but I still wonder 1) if your description is about standard (1998) C++? 2) if all compilers really behave like this? > Just imagine - what would happen if there was a C++ programmer on your > tutorial and you presented these arguments? ;-) ;-) ;-) If my point is wrong, I'll withdraw it. The first thing when arguing is to have valid argument, otherwise it is too easy to dismiss you. Thanks for pointing out valid arguments! -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr