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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1cf653444208df72 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-06 05:01:51 PST Path: archiver1.google.com!news2.google.com!news1.google.com!newsfeed.stanford.edu!pln-w!spln!dex!extra.newsguy.com!newsp.newsguy.com!drn From: MM@MM Newsgroups: comp.lang.ada Subject: Re: ada vs. cpp Date: 6 Oct 2001 04:23:44 -0700 Organization: Newsguy News Service [http://newsguy.com] Message-ID: <9pmpk00a53@drn.newsguy.com> References: <9pgr68$7pu1@news.cis.okstate.edu> <9phnic$9g5$1@nh.pace.co.uk> <5fkv7.134136$w7.19988807@news02.optonline.net> NNTP-Posting-Host: p-797.newsdawg.com X-Newsreader: Direct Read News 2.90 Xref: archiver1.google.com comp.lang.ada:13826 Date: 2001-10-06T04:23:44-07:00 List-Id: In article , Pascal says... > > >I know. Yet in C/C++ it is hard to beat > > V1 : constant String := "1234567890"; > V2 : constant String := "AAA" & V1 (3 .. V1'Last - 2) & "BBB"; > >in readability and ease of use. > >I have done many text processing code in both C/C++ and Ada and from >experience I found the Ada code far more readable. There is may examples. > >Another one that come to mind: > > V1 : constant String := "0123/zzz"; > > subtype Code is Positive range 1 .. 4; > subtype Arg is Positive range 6 .. 8; > > V2 : constant String := V1 (Arg) & '-' & V1 (Code); > >This is not theory, I have used these kinds of code many many times. And again >I don't see how we could have a better readability ! Ada is good at the nity gritty stuff. The above shows the value of attributes that comes with the language, and being able to use subranges. Neither of which is part of c/c++ nor java. But all these languages are much more popular than Ada. go figure. May be what we need is a new language, which has the good stuff of Ada (strong typing, ranges, attributes, separation of interface and implementation, generics, tasks, etc...), but with a more modern OO look and feel (as in Java), maybe even garbage collection thrown in (although I have mixed feeling on GC). Delphi now comes the closest thing to this (it is sort of Ada like, but also has Java like classes in terms of syntax and feel to it). Combine those togother and call it Ada++ or better, jAda, and you will have a real winner. Any language designer out there wants to take this on?