comp.lang.ada
 help / color / mirror / Atom feed
From: "Chad R. Meiners" <crmeiners@hotmail.com>
Subject: Re: Safe C++
Date: Wed, 19 Sep 2001 17:38:32 -0400
Date: 2001-09-19T17:38:32-04:00	[thread overview]
Message-ID: <9ob2u6$2r4l$1@msunews.cl.msu.edu> (raw)
In-Reply-To: 20010919102107.L4954-100000@shell5.ba.best.com


"Brian Rogoff" <bpr@shell5.ba.best.com> wrote in message
news:20010919102107.L4954-100000@shell5.ba.best.com...
> On Wed, 19 Sep 2001, Chad Robert Meiners wrote:
> > On Wed, 19 Sep 2001, Brian Rogoff wrote:
> > > Rather than just snipe from the side at people trying to do better,
take
> > > a look at
> > >
> > > http://www.cs.cornell.edu/projects/cyclone/
> > >
> > > and consider that it certainly has some features which are arguably
better
> > > than the Ada alternatives.
> >
> > Which features are better than the Ada alternatives?
>                     ^-- arguably
>
> Pattern matching
> Parametrically polymorphic functions
> Tuples

I'll have to trust you or these three since I have never encountered a
situation where I was ever wishing for such functionality.  The examples in
Cyclone's documentation gave me the impression that they are useful to
C programmer because they definitely add value to the C syntax.  I just
don't see how they would add value
to Ada's syntax.  Perhaps if you could tell me why it would be useful to you
to have them incorporate into Ada, I could their the significance of the
value added.

> I think region based memory management is a win too, and could probably be
> fit onto Ada without too much disruption.

I am pretty sure that when an access type falls out of scope in Ada, any
storage pools associated with it may be deallocated.  This seems pretty
close to what regions do?

> > Cyclone doesn't appear to help reduce the number of pointers that the
> > programmer has to manage which I consider to be a major drawback with
the
> > language.
>
> Ada has advantages here, no doubt, but Cyclone makes the manipulations
> much safer than C or C++. It's hardly fair to compare the unsafety of
> Cyclone pointers with raw C!
>
> As much as I prefer Ada to C, it's clear that some of these Safer C/C++
> variants, especially ones which don't try to follow C++ too much, have a
> lot to offer. Ada advocates can start seeming awfully provincial, with
> their allergies to anything smacking of C.

One of the major flaws with deriving something better out of C is that it is
comparable to trying to build a nice boat out of a cheaply built one.  Sure
it is possible to do this but either a) you will end up scraping the boat
and rebuilding it entirely, or you will have to live with a ship that is
inconsistently built after doing a lot of work patching all of the *known*
'design flaws'.  Consistency is very important in a language.  Ada is
wonderfully consistent whereas I have my doubts with these 'Safer C/C++'s.

I don't believe that you will find very many Ada advocates that have an
allergy to anything smacking of C. I have always been under the impression
that people on this newsgroup are open to discuss suggestions for the
language.

> Now, if you were to complain that Cyclone is another one of these
> miserable flat languages without nested function definitions, I'd cheer
> you on. :-)

Although flatness is a burden, it is less so than unnecessary pointers.

> -- Brian
>
>
> > > Putting my "Ada fan" hat on, I'd say that some of the work on region
based
> > > memory management should find it's way into some Ada dialect, maybe
even
> > > into the standard. And I really think pattern matching and some other
> > > features of modern (read HM-typed, functional/declarative) languages
> > > should find their way into an Ada successor. If only the Cyclone guys
had
> > > started with Ada, or even the SPARK subset!
> > >
> > > It's really unfortunate that Ada hasn't spawned lots of research
> > > dialects, like C family languages have.
> > >
> > > -- Brian
> > >
> > >
> > >
> > - Chad R. Meiners
> >
> >
>





  reply	other threads:[~2001-09-19 21:38 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-18 19:45 Safe C++ Richard Riehle
2001-09-19 14:38 ` Brian Rogoff
2001-09-19 15:52   ` Chad Robert Meiners
2001-09-19 17:43     ` Brian Rogoff
2001-09-19 21:38       ` Chad R. Meiners [this message]
2001-09-20  3:38         ` Brian Rogoff
2001-09-20 11:52           ` Pat Rogers
2001-09-20 16:01             ` Brian Rogoff
2001-09-20  8:22         ` Colin Paul Gloster
2001-09-20 13:45           ` Chad R. Meiners
2001-09-20 21:03             ` codesavvy
2001-09-20 11:37         ` Parametrically polymorphic operations (Was: Safe C++) Jacob Sparre Andersen
2001-09-20 11:41           ` Lutz Donnerhacke
2001-09-20 12:27             ` Jacob Sparre Andersen
2001-09-20 15:49           ` Brian Rogoff
2001-09-21  9:24             ` Jacob Sparre Andersen
2001-09-20 16:22           ` Dmitry A. Kazakov
2001-09-21 16:08           ` Wes Groleau
2001-09-21 17:13             ` Jacob Sparre Andersen
2001-09-21 18:43               ` Wes Groleau
2001-09-20  2:41       ` Safe C++ David Botton
2001-09-20  2:39   ` David Botton
2001-09-20  3:21     ` Brian Rogoff
2001-09-20 12:43       ` David Botton
2001-09-25 14:21   ` Region-based mem mgmt [was: Re: Safe C++] Tucker Taft
2001-09-25 14:46     ` Tucker Taft
replies disabled

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