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,caabf5265fad78e5 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Fri, 03 Jul 2009 11:44:25 +0200 From: Georg Bauhaus User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Learning Ada References: <59O1m.404661$4m1.69194@bgtnsc05-news.ops.worldnet.att.net> <62792744-daca-437b-bdee-4b8a21f7ce27@j32g2000yqh.googlegroups.com> <82oq45tj2uu26u6ecsgq70bsjskr9dvghr@4ax.com> <878wj61bpo.fsf_-_@nbi.dk> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Message-ID: <4a4dd2f9$0$32666$9b4e6d93@newsspool2.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 03 Jul 2009 11:44:25 CEST NNTP-Posting-Host: 9d5c697b.newsspool2.arcor-online.net X-Trace: DXC=Wf0AE9IY]1NFJ3]dH>I?oEA9EHlD;3YcB4Fo<]lROoRA^YC2XCjHcbI3HA_b7fbBBC;9OJDO8_SKFNSZ1n^B98iJN7Md2W8I9fN X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:6822 Date: 2009-07-03T11:44:25+02:00 List-Id: Peter Hermann schrieb: > Jacob Sparre Andersen wrote: >> It might be to push things a bit too far, but I think it would be >> beneficial, if the types Float and Integer were removed from the >> language. > > caveat. > pragmatism needs them due to a lot of reasons: > I would need a full day to list them. I can't help thinking that claiming "pragmatism" to be a quality of Standard.Integer use is what laziness would like it to be, no offence intended: Effects of predefined types will make people debug and rewrite, sooner or later, as seen. Using C, you are almost forced to use int from the C standard very often, if only because C culture makes C programmers frown upon better types like int wrapped in a struct or like using enum where appropriate. You Get Things Done (TM) very quickly this way--it's just that Things vanish under some carpet to rot and "develop". Imagine an Ada culture without Float and Integer. Would Ada programmers (possibly grouped by prior exposure to other type systems) start writing package Everywhere is type Integer is range -(2**31) .. +(2**31) -1 ; -- be pragmatic type Float ...; -- be pragmatic end Everywhere; and use only these types in their programs? Alternatives include Copy&Paset or boiler plate macros: have your editor prompt for the range bounds of a user defined integer type when needed, and make it insert the definition. Done.