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.7 required=5.0 tests=BAYES_00,DATE_IN_PAST_24_48, FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,4f9a2b7c164500f2 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.181.13.205 with SMTP id fa13mr90836wid.3.1354677476766; Tue, 04 Dec 2012 19:17:56 -0800 (PST) Path: i11ni21530wiw.0!nntp.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!81.171.88.16.MISMATCH!eweka.nl!hq-usenetpeers.eweka.nl!xlned.com!feeder3.xlned.com!news.astraweb.com!border6.a.newsrouter.astraweb.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!rt.uk.eu.org!news.mixmin.net!news2.arglkargh.de!noris.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Mon, 03 Dec 2012 12:53:58 +0100 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada on Raspberry Pi: new article in MagPi issue 8 References: <8ecc163c-7772-4528-a0d0-eb1ecfd67d98@googlegroups.com> In-Reply-To: X-Enigmail-Version: 1.4.6 Message-ID: <50bc92d6$0$6641$9b4e6d93@newsspool2.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 03 Dec 2012 12:53:58 CET NNTP-Posting-Host: 3d045860.newsspool2.arcor-online.net X-Trace: DXC=aF>jUS?BD^Q[7Non7UCi8UA9EHlD;3YcR4Fo<]lROoRQ8kFZLh>_cHTX3j] On 02.12.12 18:19, Luke A. Guest wrote: > 4) Representation clauses for mapping to hardware or C API's Based on what John McCormick found to be so valuable about Ada's expressive fundamental type system, I'd like to humbly suggest that it be made known, and preferred to implementation defined C like types such as Integer. In particular, Ada's scalar types allow programmers to just say what they already know instead of thinking hard about which int-like type might somehow match what they cannot express in the fundamental type system (of C, or Ada's library types), such as range 1 .. 80_000 (vs C's INT_MAX/Ada's System.Max_Int): "Upon reading the project listings and team member diaries, I concluded that the major advantages of Ada for these students were, in order of importance: "* Modeling of scalar objects. + Strong typing. + Range constraints. + Enumeration types. * Parameter modes that reflect the problem rather than the mechanism. * Named parameter association. * Arrays whose indices do not have to begin at zero. * Representation clauses for device registers (record field selection rather than bit masks). * Higher level of abstraction for tasking (rendezvous rather than semaphores). * Exception handling. "Compilation model detects obsolete units "I found my original hypothesis, that the major problem was C's low-level tasking mechanism, to be incorrect. While Ada's high level of abstraction for tasking was helpful to the students, it was the accurate modeling of scalar quantities that contributed the most to Ada's success in this course." Crosstalk article also found here http://archive.adaic.com/projects/atwork/trains.html