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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f40056d015b2ae33 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail NNTP-Posting-Date: Mon, 12 Nov 2007 07:23:36 -0600 From: Brian Drummond Newsgroups: comp.lang.ada Subject: Re: Suggestions for topics in an Ada course? Date: Mon, 12 Nov 2007 13:34:25 +0000 Reply-To: brian@shapes.demon.co.uk Message-ID: References: <4737291e$0$27064$4d3efbfe@news.sover.net> <47383b63$0$27066$4d3efbfe@news.sover.net> X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 81.132.209.196 X-AuthenticatedUsername: NoAuthUser X-Trace: sv3-reRsLC2cMtCN10MGh7vIeJbddmtXitJ0aA7Nmtja+riXg10Z7mZRyZlercMneGjwqVqTv9MdksuNPav!uZsWHcSn7/+dXhLI2yFjHCtQvcwpGpFhAhoLKry6D2lBASZ7mCUvCnTYDV/pfms9NRVhMSzgBR/v!afH0 X-Complaints-To: abuse@btinternet.com X-DMCA-Complaints-To: abuse@btinternet.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.35 Xref: g2news1.google.com comp.lang.ada:18311 Date: 2007-11-12T13:34:25+00:00 List-Id: On Mon, 12 Nov 2007 06:39:20 -0500, "Peter C. Chapin" wrote: >wilson wrote: > >> That first language, as someone commented earlier, sets up all kinds of >> pathways (ruts?) in the brain that are very hard to modify. >> >> This is not to discourage you from trying. God knows we need more >> people like you. It is just a note about possible difficulties along >> the way. > >Thanks for the warning. I know people are influenced, for better or >worse, by what they already know. How could it be otherwise? Part of my >job as an educator is to figure out how to teach people new things >despite their previous bias. One can't work in this field without >believing that it is possible. Perhaps the way is to contrive half a dozen realistic examples where errors go unnoticed (except by the bad guys!), and to show how a type system will (a) stop some errors at compilation (b) eliminate others altogether (for array size n, iterate over array'range instead over 0 to n ... *) (c) catch others via exceptions instead of propagating incorrect results (yes, the C prototypes will have bugs built in; bonus points for finding them!) Create essentially the same console input system in both languages and challenge them to break it... >Steve's suggestion of looking at tasking is good. That is a nice feature >of Ada and also, as he said, a topic of current interest with a certain >glamor. I'll have to think about that some more. This was the first thing that struck me (coming to Ada from VHDL which is probably equally misunderstood, but where parallelism is even more simply expressed). There is a lot of grief and woe about the difficulty of exploiting multiple cores and how long it will take to develop the tools to catch up... there's a wonderful little example in Grady Booch/Doug Bryan (Software Engineering with Ada) - ch 14 - on matrix manipulation with tasks. The actual algorithm could be anything massively parallel; prime numbers? searches? shading triangles? just create an array of tasks (dynamically sized to no. of cores?) and iterate over it twice; once to feed it inputs, once to collect the finished work. Compare and contrast with fork/join etc... IMO C++ has done us one big favour. I was put off Ada for about 20 years becuse of rumours about its size and complexity... with the acceptance of C++, that argument is no longer valid. - Brian