comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <bauhaus.rm.tsoh@maps.futureapps.de>
Subject: Re: Java-Ada 2005 Syntax / Language Features Comparisons
Date: Thu, 09 Aug 2007 13:15:49 +0200
Date: 2007-08-09T13:11:28+02:00	[thread overview]
Message-ID: <46baf660$0$21004$9b4e6d93@newsspool1.arcor-online.net> (raw)
In-Reply-To: <1186641851.035873.250020@57g2000hsv.googlegroups.com>

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...





  reply	other threads:[~2007-08-09 11:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-08 20:28 Java-Ada 2005 Syntax / Language Features Comparisons michael.mcnett
2007-08-09  6:44 ` Maciej Sobczak
2007-08-09 11:15   ` Georg Bauhaus [this message]
2007-08-09 12:33     ` michael.mcnett
2007-08-10 22:46       ` John McCormick
2007-08-11  2:08         ` michael.mcnett
2007-08-09  9:46 ` Anilkumar.T
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox