comp.lang.ada
 help / color / mirror / Atom feed
From: Al Christians <achrist@easystreet.com>
Subject: Re: From extended Pascals to Ada 95 guide
Date: 2000/08/28
Date: 2000-08-28T00:00:00+00:00	[thread overview]
Message-ID: <39AA8FFB.C9549B55@easystreet.com> (raw)
In-Reply-To: slrn8qk5u7.26ft.marcov@toad.stack.nl

Marco van de Voort wrote:
> 
> In article <39A991F3.A8D8BED7@easystreet.com>, Al Christians wrote:
> >
> >The principal criterium is size of the language definition/reference
> >manual.  Modula-3's is under 60 pages, IIRC, much smaller than Ada's.
> >And Wirth was some kind of advisor to the M3 design team.
> 
> Why is that the principal criterium?
> 

Because a concise language definition has been a design goal of the 
Wirth-type languages.  The last, Oberon-2, was considered a successful
design because it got this down to about 15 pages.


> >All three of these languages, M2, M3, and Ada, now support generics,
> >and that gives them a big advantage over Delphi for coding without doing
> >aribtrary conversions between data types.
> 
> Could you elaborate on this?
> 
> 
> Of course in a standard Delphi program those stress tested VCL 
> classes are used mostly.
> 


If I define my own type in a Pascal program and want to save it in
one of the VCL containers, the code would look like this:

    { To Insert }      AContainer.Objects[i] := Pointer(MyObject);
    { To Retrieve }    MyObject := TMyObject(AContainer.Objects[i]);

The compiler can't check if the conversion of type from Pointer back
to TMyObject is applicable.  Some typographical or thinkographical
error causing an object of the wrong type to be converted to a Pointer 
when inserting is not detected until retrieval at run time.  Delphi is
far from the worst offender in this regard.  Look at any book on COM
programming in C++, and you see about three programmer specified 
conversions in each four lines of code.  It's almost like programming
with no user-defined types at all.

In Ada, this would be done with generic containers, and no type 
conversions would be required.   By defining languages with strict 
rules for type conversions, Wirth made progress against certain 
kinds of errors.  By giving us ways around the rules, Borland made
Wirth's languages practical for day-to-day use.  Generics in Ada,
M3, and now M2, combine good features from each approach.


Al




  reply	other threads:[~2000-08-28  0:00 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-08-24  0:00 From extended Pascals to Ada 95 guide gdemont
2000-08-24  0:00 ` James Smith
2000-08-24  0:00   ` ODRe: " Richard Riehle
2000-08-29  0:00     ` James Smith
2000-08-30  0:00       ` Marco van de Voort
2000-08-25  0:00   ` Gautier
2000-08-25  0:00     ` Marco van de Voort
2000-08-25  0:00       ` Gautier
2000-08-25  0:00         ` Marco van de Voort
2000-08-25  0:00           ` Charles Hixson
2000-08-26  0:00             ` steve
2000-08-26  0:00               ` Marco van de Voort
2000-08-27  0:00               ` David Botton
2000-08-28  6:41                 ` Ole-Hjalmar Kristensen
2000-08-28  0:00                   ` David Botton
2000-08-28  0:00             ` Marco van de Voort
2000-08-28  0:00               ` Gautier
2000-08-28  0:00                 ` Marco van de Voort
2000-08-28  0:00                   ` Gautier
2000-08-28  0:00                     ` Charles Hixson
2000-08-28  0:00                   ` Marin D. Condic
2000-08-28  0:00                     ` Marco van de Voort
2000-08-28  0:00                       ` Gautier
2000-08-28  0:00                         ` Marco van de Voort
2000-08-28  0:00                       ` Larry Elmore
2000-08-28  0:00           ` Richard Riehle
2000-08-29  6:53             ` Marco van de Voort
2000-08-25  0:00     ` Preben Randhol
2000-08-25  0:00       ` Pat Rogers
2000-08-25  0:00         ` Marin D. Condic
2000-08-25  0:00           ` Pat Rogers
2000-08-26  0:00             ` Marin D. Condic
2000-08-25  0:00           ` Larry Elmore
2000-08-26  0:00             ` Dimmy Timchenko
2000-08-26  0:00             ` Marin D. Condic
2000-08-27  0:00               ` David Botton
2000-08-27  0:00                 ` Marin D. Condic
2000-08-27  0:00                   ` David Botton
2000-08-28  0:00                     ` Marin D. Condic
2000-08-27  0:00                   ` tmoran
     [not found]                     ` <017801c0105d$06e88ac0$cf18b70a@db2000>
2000-08-27  0:00                       ` tmoran
2000-08-28  0:00                         ` Marin D. Condic
2000-08-28  0:00                       ` Larry Kilgallen
2000-08-28  0:00                     ` Marin D. Condic
2000-08-29  0:00                       ` Gautier
2000-09-06  0:18                   ` John English
2000-08-28  0:00               ` Ray Blaak
2000-08-26  0:00           ` Robert C. Leif, Ph.D.
2000-08-26  0:00     ` Robert C. Leif, Ph.D.
2000-08-25  0:00   ` Robert Deininger
2000-08-25  0:00   ` Tarjei T. Jensen
2000-08-27  0:00   ` Ronald Cole
2000-08-27  0:00     ` Richard Kenner
2000-08-28  0:00       ` Ronald Cole
2000-08-27  0:00     ` David Starner
2000-08-27  0:00       ` Al Christians
2000-08-28  0:00         ` Marco van de Voort
2000-08-28  0:00           ` Al Christians [this message]
2000-08-28  0:00             ` Ray Blaak
2000-08-28  0:00           ` Gautier
2000-08-28  0:00             ` Marco van de Voort
2000-08-28  0:00         ` nabbasi
2000-08-29  0:00           ` David Starner
2000-08-29  0:00             ` Charles Hixson
2000-08-30  0:00               ` Gary Scott
2000-08-30  0:00                 ` Charles Hixson
2000-08-30  0:00                   ` Gary Scott
2000-08-29  0:00           ` Brian Rogoff
2000-08-29  0:00           ` Larry Kilgallen
2000-08-29  0:00             ` Marco van de Voort
2000-08-29  0:00               ` Jonas Maebe
2000-08-29  0:00               ` Gautier
2000-08-29  0:00                 ` Marco van de Voort
2000-09-06  0:38               ` John English
2000-09-08 18:41                 ` Stefan Skoglund
2000-09-08 19:24                   ` Marco van de Voort
2000-09-09 17:50                     ` Stefan Skoglund
2000-09-10 16:40                       ` Marco van de Voort
2000-09-11  0:59                         ` Ken Garlington
2000-09-11 13:01                   ` John English
2000-09-11 14:45                     ` Ehud Lamm
2000-09-11 19:32                       ` Marco van de Voort
2000-09-27 23:03                       ` John English
2000-08-29  0:00           ` Ehud Lamm
2000-09-06  0:26           ` John English
2000-09-06 16:08             ` Charles Hixson
2000-08-28  0:00       ` Marco van de Voort
     [not found] <01a101c0106f$745c3c70$cf18b70a@db2000>
2000-08-28  0:48 ` tmoran
replies disabled

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