comp.lang.ada
 help / color / mirror / Atom feed
* Re[2]: Ada The Best Language?
@ 2001-07-18 14:40 ANH_VO
  2001-07-18 17:10 ` Ted Dennison
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: ANH_VO @ 2001-07-18 14:40 UTC (permalink / raw)
  To: codesavvy, comp.lang.ada

Codesavvy, for a start, can a linked list be implemented in C++ without pointer?


____________________Reply Separator____________________
Subject:    Re: Ada The Best Language?
Author: codesavvy@aol.com (codesavvy)
Date:       7/18/01 3:35 AM

Just to be clear.  I think Ada 95 is a fine programming language that
is suitable for many programming problems.  It may even offer more
advantages than C++ but if it does the differences are not significant
in my mind.  For a programming language to be considered vastly
superior (many Ada advocates do consider Ada to be vastly superior) I
believe that developers utilizing the language should show a
substantial increase in productivity or it should solve a class(es) of
programming problems that another language can't.  I know the second
reason doesn't necessarily mean the language is vastly superior for
all programming problems but it is something to consider.  There may
be some studies that show developers to be significantly more
productive.  If there are I would be interested in reviewing such
studies.  Also I would be interested in those programming problems
that Ada 95 solves that C++ can't.

"Beau" <beau@hiwaay.net> wrote in message
news:<tl9tq98nt23c4c@corp.supernews.com>...
> so the pissing contest begins...
> 
> --
> ~Beau~
> beau@hiwaay.net
> 
> "codesavvy" <codesavvy@aol.com> wrote in message
> news:5be89e2f.0107170838.c71ad61@posting.google.com...
> > How come it is not more widely accepted?  The stuff I read here states
> > that it is because the rest of the world is stupid.  From what I can
> > tell there is plenty of crappy code written in Ada.  I think many who
> > share the view that Ada is the best programming language offering
> > significant advantages over other programming language might want to
> > re-think their positions.
_______________________________________________
comp.lang.ada mailing list
comp.lang.ada@ada.eu.org



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Re[2]: Ada The Best Language?
  2001-07-18 14:40 Re[2]: Ada The Best Language? ANH_VO
@ 2001-07-18 17:10 ` Ted Dennison
  2001-07-31  5:24   ` David Thompson
  2001-07-26  1:53 ` Lao Xiao Hai
  2001-08-06 22:41 ` Re[2]: " cppwiz
  2 siblings, 1 reply; 5+ messages in thread
From: Ted Dennison @ 2001-07-18 17:10 UTC (permalink / raw)


In article <mailman.995475143.28977.comp.lang.ada@ada.eu.org>, ANH_VO@udlp.com
says...
>
>Codesavvy, for a start, can a linked list be implemented in C++ without pointer?

I'm sorry to answer for the troll you're chasing after, but the answer to that
depends on what you consider a pointer. You can certianly make array-based
objects in C without using dynamic allocation. However, every array in C is
basicly a chunk of memory and a pointer with a preset "[]" operation for
performing pointer math on it. In that sense, you can't even have an array in C
without using a pointer.

---
T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html
          home email - mailto:dennison@telepath.com



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ada The Best Language?
  2001-07-18 14:40 Re[2]: Ada The Best Language? ANH_VO
  2001-07-18 17:10 ` Ted Dennison
@ 2001-07-26  1:53 ` Lao Xiao Hai
  2001-08-06 22:41 ` Re[2]: " cppwiz
  2 siblings, 0 replies; 5+ messages in thread
From: Lao Xiao Hai @ 2001-07-26  1:53 UTC (permalink / raw)




ANH_VO@udlp.com wrote:

> Codesavvy, for a start, can a linked list be implemented in C++ without pointer?

Ahn,

Yes it can.  Well, yes it can if what you mean by a pointer is a raw pointer.
Sadly,
this is the kind of pointer most C++ programmers routinely use.   Ada raises the
level of abstraction and calls a pointer an access type (as Java calls it a
reference),
thereby hiding the dangerous aspects of indirection beneath a compiler-enforced
mechanism.  In the case of Ada, a pointer, AKA access type, is safe by default.  A
C++ pointer is unsafe, by default.   We can relax the safety features of an access
type through a variety of unchecked and library features.   In C++, we raise the
level of abstraction through the use of a "smart pointer" class.  This, in many
ways,
is equivalent to an access type, except it may have built-in garbage collection.
The
smart pointer restricts the set of operations on an object of its type in much the
same
way an access type does in Ada.

Unfortunately, most C++ programmers either do not understand how to use smart
pointers or regard them as "inefficient."    Also, few college professors know
enough
about them to properly teach their use in object-oriented programming classes.

Richard Riehle




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Re[2]: Ada The Best Language?
  2001-07-18 17:10 ` Ted Dennison
@ 2001-07-31  5:24   ` David Thompson
  0 siblings, 0 replies; 5+ messages in thread
From: David Thompson @ 2001-07-31  5:24 UTC (permalink / raw)


Ted Dennison <dennison@telepath.com> wrote in message
news:fqj57.23735$Kf3.319906@www.newsranger.com...
...
> I'm sorry to answer for the troll you're chasing after, but the answer to that
> depends on what you consider a pointer. You can certianly make array-based
> objects in C without using dynamic allocation. However, every array in C is
> basicly a chunk of memory and a pointer with a preset "[]" operation for
> performing pointer math on it. In that sense, you can't even have an array in
C
> without using a pointer.

Nit:  in BCPL and B there was a real pointer for each array variable;
in C such a pointer is instead formed "on demand" -- when you
reference an array (except 2 special cases, 3 in C++) it is silently
converted to a pointer to the first element, often called "decay",
and subscripting [] is actually defined on this resulting pointer,
so yes you are "using" a pointer even though it wasn't stored.
And when you declare a function(subprogram) (formal)parameter
as an array, it actually declares a pointer instead, which can be
passed by-value from a decayed array, and used to access it.
(And subscripting is commutative!)

This evolution is described in Dennis Ritchie's ACM2HOPL paper,
also available on http://cm.bell-labs.com/cm/cs/who/dmr/

--
- David.Thompson 1 now at worldnet.att.net








^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Re[2]: Ada The Best Language?
  2001-07-18 14:40 Re[2]: Ada The Best Language? ANH_VO
  2001-07-18 17:10 ` Ted Dennison
  2001-07-26  1:53 ` Lao Xiao Hai
@ 2001-08-06 22:41 ` cppwiz
  2 siblings, 0 replies; 5+ messages in thread
From: cppwiz @ 2001-08-06 22:41 UTC (permalink / raw)


ANH_VO@udlp.com wrote in message news:<mailman.995475143.28977.comp.lang.ada@ada.eu.org>...
> Codesavvy, for a start, can a linked list be implemented in C++ without pointer?

Yes, but it sure isn't pretty ;-)



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-08-06 22:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-18 14:40 Re[2]: Ada The Best Language? ANH_VO
2001-07-18 17:10 ` Ted Dennison
2001-07-31  5:24   ` David Thompson
2001-07-26  1:53 ` Lao Xiao Hai
2001-08-06 22:41 ` Re[2]: " cppwiz

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