comp.lang.ada
 help / color / mirror / Atom feed
From: kalvin.news@gmail.com
Subject: Re: Ada and Java/C++
Date: Tue, 28 Aug 2012 07:22:33 -0700 (PDT)
Date: 2012-08-28T07:22:33-07:00	[thread overview]
Message-ID: <b1bc276d-17c8-4597-b0d4-7ae9471113a1@googlegroups.com> (raw)
In-Reply-To: <k1i7q0$4oa$2@dont-email.me>

tiistai, 28. elokuuta 2012 13.50.41 UTC+3 Brian Drummond kirjoitti:
> On Mon, 27 Aug 2012 19:14:39 -0700, Adam Beneschan wrote:
> 
> 
> 
> > On Monday, August 27, 2012 4:16:39 PM UTC-7, Randy Brukardt wrote:
> 
> > 
> 
> >> I agree with you here (but also see below). But the syntax of a
> 
> >> language is a very important part of the foundation of the language.
> 
> >> Ada's syntax is designed to minimize the possibility for inadvertant
> 
> >> errors, which is not the case with the C syntax. 
> 
> 
> 
> > Hmmm ... I guess it depends on just how much of the syntax the OP is
> 
> > thinking of keeping.  I'd think that if we're just talking about the
> 
> > "look and feel", one could probably develop a language that has the
> 
> > functionality of Ada but using C-like keywords and operators, without
> 
> > compromising safety.  
> 
> 
> 
> I suspect you are onto something here ... I believe the OP meant not the 
> 
> syntax, but the lexical level of the language. A lot of the "feel" of a 
> 
> page of source comes from the tokens used, rather than the order of their 
> 
> arrangement. 
> 
> 
> 
> Changing begin and end to { and } does not change the syntax a jot*, but 
> 
> makes the language look a lot more like C. And I suspect THAT is what the 
> 
> OP intended. 
> 
> (I appreciate that would leave a lot of work around things like 
> 
> conditional statements, to make them "look right" while preserving their 
> 
> syntactic advantages. But bear with me...)
> 
> 
> 
> Perhaps it could be run through a simple macro preprocessor and turned 
> 
> into Ada.
> 
> 
> 
> > I'm not saying it's a good idea. Personally, if
> 
> > someone sent me a compiler for a language like that, I wouldn't just
> 
> > delete it from my system, I'd print it out just so that I could run it
> 
> > through a shredder and then stomp on it.
> 
> > 
> 
> > But some changes, like using [] instead of () for array indices or { }
> 
> > instead of begin/end or expressing type conversions as (type)expression
> 
> > instead of type(expression), wouldn't seem to have any negative impacts
> 
> > on safety.  (Just on aesthetics.)  
> 
> 
> 
> And refactoring, when you substitute evaluation for lookup, or vice versa.
> 
> 
> 
> > The point is that if the OP's premise is correct--that Java is popular
> 
> > because it borrows from C syntax even though it eliminated some of the
> 
> > unsafe and error-prone things from the language, then in theory, a
> 
> > mutant Ada language with C-like syntax could do the same.  If I were
> 
> > induced by a very large sum of money to help develop such a language,
> 
> > I'd want to make some changes like (1) making assignment statements
> 
> > statements rather than expressions, ...
> 
> 
> 
> While agreeing with your list, I would go further and simply keep Ada's 
> 
> syntax largely intact*; restricting the changes to what can be 
> 
> accomplished at the lexical analysis stage.
> 
> 
> 
> * I don't see that transforming "a += b" into "a := a + b" etc would 
> 
> break this model...
> 
> 
> 
> - Brian

Brian, you were able to express my intention more clearly that I could do. And the idea of Jada-to-Ada translator is also a good for proof-of-concept. Ultimately the translator needs to be scrapped, as Ada is still a four letter word for many programmers (pun intended).

- Calvin



  reply	other threads:[~2012-08-28 14:22 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 [this message]
     [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
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