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: a07f3367d7,ab1d177a5a26577d X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news4.google.com!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: What's wrong with C++? Date: Fri, 18 Feb 2011 00:17:19 +0100 Organization: Adalog Message-ID: References: <1ee1a434-4048-48f6-9f5e-d8126bebb808@r19g2000prm.googlegroups.com> <4D5C1824.3020509@obry.net> <21443638-5ec6-49d4-aafe-6fbc1e59daba@r19g2000prm.googlegroups.com> <87d2371e-af91-4d6a-8d5b-3ddb972d84fd@k17g2000pre.googlegroups.com> <87zkpuze5e.fsf@ludovic-brenta.org> <4d5d791f$0$17330$882e7ee2@usenet-news.net> <4d5da93f$0$17330$882e7ee2@usenet-news.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Thu, 17 Feb 2011 23:17:16 +0000 (UTC) Injection-Info: mx03.eternal-september.org; posting-host="cJo7kSTQUrCFv2/D8KKtqw"; logging-data="18157"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18LpXLOunLclxZK5W5+e0p0" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 In-Reply-To: <4d5da93f$0$17330$882e7ee2@usenet-news.net> Cancel-Lock: sha1:FXpUVNlAUcmAN66FZn7LhbbNJ88= Xref: g2news1.google.com comp.lang.ada:17386 Date: 2011-02-18T00:17:19+01:00 List-Id: Le 18/02/2011 00:03, Hyman Rosen a écrit : > It also occurs to me that the ability to control their internal > representation makes them seem an awful lot like integers! I think you might be missing a fundamental point about the typing model of Ada here. There are two levels: an abstract type that pertains to the problem domain, and an internal representation (which eventually boils down to bits). In Ada, you work in the problem domain, independently of the representation. Normally, the compiler chooses the internal representation for you. However, if you need a certain representation, you can impose it on the compiler; nevertheless, you still work in the abstract domain. A typical example of this is what we discussed about the 'Pos attribute: it is defined as the relative position of an enum in the list where it is defined. It has nothing to do whatsoever with its internal representation (although, for efficiency reasons, they are the same /by default/). -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Adalog a déménagé / Adalog has moved: 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00