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.4 required=5.0 tests=BAYES_00,UNCLOSED_BRACKET autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c31dbd48cbe96f X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.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: Thu, 09 Aug 2007 13:15:49 +0200 From: Georg Bauhaus Organization: # User-Agent: Thunderbird 1.5.0.12 (Macintosh/20070509) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Java-Ada 2005 Syntax / Language Features Comparisons References: <1186604907.961690.311040@b79g2000hse.googlegroups.com> <1186641851.035873.250020@57g2000hsv.googlegroups.com> In-Reply-To: <1186641851.035873.250020@57g2000hsv.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <46baf660$0$21004$9b4e6d93@newsspool1.arcor-online.net> NNTP-Posting-Date: 09 Aug 2007 13:11:28 CEST NNTP-Posting-Host: 2a9dc04d.newsspool1.arcor-online.net X-Trace: DXC=gG2<8]_K?h:i6K;>iZ]763ic==]BZ:af>4Fo<]lROoR1Fl8W>\BH3Y2;>okS_`I;A4A:ho7QcPOV3e4fS_CemS;>Ka57SSb4U[1 X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:1377 Date: 2007-08-09T13:11:28+02:00 List-Id: Maciej Sobczak wrote: > On 8 Sie, 22:28, michael.mcn...@usma.edu wrote: >> Is anyone aware of a reference card or short document that shows >> equivalent Ada syntax and language features with those of Java. >> >> Students could use this to understand data structure concepts written >> in a book using Java, and then implement these concepts in code using >> Ada 2005. These students are CS majors and will have already taken a >> course in Ada. What kind of book is this? Would it be impractical to just use an Ada book? Key notions will include, with their syntax, Java class <-> Ada package + tagged type (side note: JVM classes use tag fields, too!) Java packages <-> Ada package hierarchies Java subtypes <-> Ada packages and derived types Java public/protected/private <-> Ada public/private + visibility rules + nesting Java low level concurrency building blocks <-> Ada built in concurrency features We have tried to collect a few hints in http://en.wikibooks.org/wiki/Ada_Programming/Object_Orientation > If they are CS majors, then they should be able to think in terms of > abstracts and should not need such primitive cheat-sheets for 1:1 > translations between languages. However, aproaching the subjects from a conceptual point of view seems like a good opportunity to me. You can then demonstrate, for example, where and when values are better than references, see the benefits of a well defined base type system, etc. In particular when the students have already taken a course in Ada. > Teaching people to recode some stuff > using "syntax equivalents" is a Bad Idea. Yes, syntax only transformations are indeed prone to financial and technical desaster. They can be dangerous. There is enough anecdotal evidence already. But I'm not sure this fits the OP's motivation? One more anecdote: A programmer used Java for programming but wrote identifiers such as performThisActionOnThingWithThatConstraint( equallyLengthyArgumentValue, ...); It looked like the programmer had done some vanilla Scheme programming before and was mathematically skilled. Would syntax charts for plain Scheme <-> Java have helped at all? I doubt it. However, studying the first chapters of any O-O methods book such as the ones by Booch would have helped as these will inevitably make you notice the method of finding objects by looking at function names...