comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: Ada and Java/C++
Date: Tue, 28 Aug 2012 13:00:15 +0300
Date: 2012-08-28T13:00:15+03:00	[thread overview]
Message-ID: <aa3j5fF4q4U1@mid.individual.net> (raw)
In-Reply-To: <f38757f3-8504-472b-8918-961993f371b8@googlegroups.com>

On 12-08-28 11:28 , kalvin.news@gmail.com wrote:
> tiistai, 28. elokuuta 2012 9.57.40 UTC+3 Shark8 kirjoitti:
>> On Monday, August 27, 2012 11:35:28 PM UTC-6, kalvi...@gmail.com
>> wrote:
>> 
>>> My suggestion here is to introduce Ada's good virtues for C and
>>> Java programmers in syntax that is familiar to most of the
>>> software engineers.
>> 
>> You aren't listening to the replies you're getting; it's a bad idea
>> to try to gloss over (extend) C/Java syntax. Randy's reply is a
>> good one in explaining why syntax itself matters.
> 
> I hear you, and I have read replies - Randy's too, and I could not
> agree more with the replies.

If you agree with the replies, none of which support your suggestion,
why do you persist with the idea?

> But if the programmers *want* to use or are *insiting in using*
> languages with resemble Java/C,

Any programmer who is that pig-headed about syntax is probably too
pig-headed to learn the new concepts that Ada provides, too. Good riddance.

Good programmers (well, people whom I consider good programmers) *like*
to learn new languages, with new syntax and all, as long as the new
things expand their programming abilities. I don't think Ada is held
back by its non-C/Java syntax. It is held back by inertia, poor
visibility, lack of compilers for many embedded systems, and by not
being aimed at web-based applications.

> As many responders have pointed out, that it might not be possible to
> express Ada completely in C/Java-like syntax. Maybe we could come up
> with something, that is half-way between the languages. Someone in
> the thread suggested expressing a subset of Ada in C/Java-like
> syntax. That might be a good and reasonable solution.

I spoke of such a subset, but only to reject it, because it would be a
dead end.

> If the programmer wants to get full Ada power, they should start
> using Ada instead. But they would already be half-way there:

No, they would be half-way *in the wrong direction*.

> They
> would be accustomed with strict type checking, packages etc. and
> better software construction.

The Ada features for these things are packages, the definition of new
types, type derivation, generics, and tagged types. There is no syntax
for such things in C, so they would not be in the "C subset".

If you want to help C programmers, IMO the best way forward is to
improve C. Many C programmers would like C to have a better concept of
modules, perhaps similar to Ada packages, and the same goes for many
other weaknesses of C. But they also need to have compatibility, which
is possible by adding new abilities to C, but is not possible by
switching to Ada with a C-look-alike syntax.

It seems to me that C++ is already moving in this direction, for example
by making it possible to prevent implicit use of conversion functions.

> Btw, the ideas on implementing a preprocessor and/or JVM compiler are
> excellent.

Ada compilers that target the JVM exist. They use the standard Ada
syntax. The target is irrelevant to your proposal.

Way back, there were Ada preprocessors (or perhaps even compilers?) to
let one write Ada programs with keywords in French, and perhaps other
languages. I don't think any remain.

For a preprocessor from C-like Ada to Ada, the basic problem remains:
since Ada has many features that C lacks, you would have to invent new
C-like syntax for these features, and then they would not be familiar to
C programmers.

-- 
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
      .      @       .



  reply	other threads:[~2012-08-28 10:00 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-27 10:46 Ada and Java/C++ kalvin.news
2012-08-27 11:48 ` Dmitry A. Kazakov
2012-08-27 13:44   ` kalvin.news
2012-08-27 14:33     ` Dmitry A. Kazakov
2012-08-27 15:26     ` J-P. Rosen
2012-08-27 15:46       ` Georg Bauhaus
2012-08-27 16:08       ` kalvin.news
2012-08-27 23:16     ` Randy Brukardt
2012-08-28  2:14       ` Adam Beneschan
2012-08-28 10:50         ` Brian Drummond
2012-08-28 14:22           ` kalvin.news
     [not found]           ` <gcup38ldi4afrt9q2uj70qoe7l2lcn4rk1@invalid.netcom.com>
2012-08-28 23:00             ` Brian Drummond
     [not found]               ` <fouq38tqdp7fh86l2dp2pmr8jfdgi24i7j@invalid.netcom.com>
2012-08-29 10:39                 ` Brian Drummond
2012-08-27 14:35   ` Nomen Nescio
2012-08-27 21:23     ` gautier_niouzes
2012-08-27 14:09 ` Niklas Holsti
     [not found] ` <al1n38tdd0tq6p1os6p6angt91mginhoup@invalid.netcom.com>
2012-08-27 14:49   ` kalvin.news
2012-08-27 14:53   ` kalvin.news
2012-08-27 19:46     ` Shark8
2012-08-27 20:11     ` gautier_niouzes
2012-08-27 19:41 ` Shark8
2012-08-27 20:06 ` gautier_niouzes
2012-08-28  5:35 ` kalvin.news
2012-08-28  6:57   ` Shark8
2012-08-28  8:28     ` kalvin.news
2012-08-28 10:00       ` Niklas Holsti [this message]
2012-08-28  8:31     ` kalvin.news
2012-08-28  9:15       ` Niklas Holsti
2012-08-28  9:54   ` gautier_niouzes
2012-08-28 14:08     ` kalvin.news
2012-08-29 10:52 ` kalvin.news
replies disabled

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