comp.lang.ada
 help / color / mirror / Atom feed
From: Richard Riehle <richard@adaworks.com>
Subject: Re: True faiths ( was Re: The true faith )
Date: Wed, 23 Jan 2002 09:49:10 -0800
Date: 2002-01-23T18:02:19+00:00	[thread overview]
Message-ID: <3C4EF796.DA604391@adaworks.com> (raw)
In-Reply-To: bruce-1B4DA9.15261223012002@news.paradise.net.nz

Bruce Hoult wrote:

> In article <3C4DE2F3.9020904@mail.com>, Hyman Rosen <hyrosen@mail.com>
> wrote:
> > You don't get to redefine the problem so that your favorite technique
> > becomes the solution.
>
> Yes you do.  The aim is to solve the customer's problem.  They don't
> give a damn whether you copy objects or pass them by reference.  They
> don't even know what the options *mean*!

It depends on what you mean by customer.   A customer of a class/type
declaration is usually another programmer.    I am a member of that
class of customers, and I do care and I do know what the options mean.
One of the things I like about Eiffel is the careful attention given to the
design of the class contract.   I want to know, from that contract, what
to expect of my engaging it.   For example, what kinds of things can go
wrong, what are my responsibilities as a user of the contract,  and what
performance considerations I might want to consider in choosing a
particular contract.   And, yes, I want to know if it includes some form
of storage management, and have some idea of what that storage
management feature will have on my own program.

The next few observations remind me of something I once heard regarding
programming rules.   "Those who make up rules about programming tend
to be people who no longer write production programs."

> -- programs are hard to analyse for correctness because of GOTOs.
> Solution: don't use them

Generally  true.   Knuth has a lengthy article on this in his book, Literate
Programming.  To simply say, "Don't use go to, is a bit simplistic."   I
have seen perfectly good examples where, during fine tuning of a program,
someone has achieved significant performance improvement with a go to.
Some languages support goto-less programming better than others.   Some
eliminate the option altogether and also eliminate the benefits of it.   Go
to
is an option that should be used sparingly, almost never, but is handy when
you actually need it.   I realize one can "prove" that it is never needed.
So
be it.  Sometimes it just might be useful.

> -- programs are hard to analyse for correctness because of destructive
> assignment.  Solution: don't use assignment.

I understand this is a joke.  However, it conforms nicely to some of the
fundamental notions of functional programming.

> -- programs are often buggy because of off-by-one errors in loop
> control.  Solution: use implicit loops and/or mapping functions
> controlled by the size of the collection they are operating on.

Well, in Ada this never seems to be a problem.    In Eiffel it is never
a problem.    It is often a problem in programs that use the C family
of languages.   However, I think C# has a fix for this.

> -- programs are often buggy because of errors in memory management.
> Solution: automate memory management.

A naive suggestion, at best.   Which automated form of memory management
will you suggest?   There are many from which one can choose.  Each has
its own benefits, depending on the kind of software you are writing.   This
is
one of the things C++ gets right.   Ada also.   The problem of automated
memory management is one of the things that makes Java ill-suited to
many kinds of embedded, real-time software applications.   Jim Rogers
makes a good point about this vis a vis Ada.   In Ada, we have the option
of selecting the memory management model we wish to use, letting it be
automatic or not, and targeting each type to a different model of memory
management when that is a appropriate.   This is a level of flexibility
not typical of most other languages.   Yes, I know one can do this in C++,
but expressibile and expressive are not the same thing.  Ada is really
expressive in allowing this kind of automated memory management for
a given type.  That is as it should be since Ada is intended for safety-
critical, real-time embedded software systems.

Richard Riehle






  reply	other threads:[~2002-01-23 17:49 UTC|newest]

Thread overview: 106+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <B85AB00A.3603%verec@mac.com>
     [not found] ` <%njZ7.279$iR.150960@news3.calgary.shaw.ca>
     [not found]   ` <B85BD264.370E%verec@mac.com>
     [not found]     ` <n7ybsg9lq8y.fsf@panix1.panix.com>
     [not found]       ` <3c36fbc5_10@news.newsgroups.com>
     [not found]         ` <gat-0501022256350001@192.168.1.50>
     [not found]           ` <4idg3u40ermnp682n6igc5gudp7hajkea9@4ax.com>
     [not found]             ` <gat-1001021155210001@eglaptop.jpl.nasa.gov>
     [not found]               ` <bruce-6C0AC5.10391411012002@news.paradise.net.nz>
     [not found]                 ` <gat-1001021515510001@192.168.1.50>
     [not found]                   ` <76be8851.0201101909.9db0718@posting.google.com>
     [not found]                     ` <gat-1101020950400001@eglaptop.jpl.nasa.gov>
2002-01-11 23:46                       ` True faiths ( was Re: The true faith ) israel r t
2002-01-12  0:38                         ` Steven T Abell
2002-01-13 12:20                           ` Kevin McFarlane
2002-01-13 18:52                             ` Erik Naggum
2002-01-14  8:12                               ` Espen Vestre
2002-01-14 10:40                                 ` israel r t
2002-01-16  6:42                                   ` Patrick Doyle
2002-01-16  8:00                                     ` israel r t
2002-01-16  8:55                                       ` Espen Vestre
2002-01-20  0:55                                         ` Mad Hamish
2002-01-20  1:18                                           ` Bruce Hoult
2002-02-13 16:31                                             ` Tom Hawker
2002-02-13 17:51                                               ` Larry Kilgallen
2002-02-13 23:28                                               ` Peter Gummer
2002-02-14  3:10                                                 ` Greg C
2002-02-14  1:56                                               ` Hartmann Schaffer
2002-02-14  9:59                                               ` Barry Watson
2002-01-16  8:00                                     ` " Do computers because it pays well" ( was Re: True faiths ) israel r t
2002-01-14 11:00                               ` True faiths ( was Re: The true faith ) Immanuel Litzroth
2002-01-18 15:19                                 ` Bob Bane
2002-01-18 17:44                                   ` René
2002-01-18 18:04                                   ` Hyman Rosen
2002-01-18 23:22                                     ` Richard Riehle
2002-01-18 23:53                                       ` Matthew Heaney
2002-01-20  5:39                                       ` Hyman Rosen
2002-01-20  5:59                                         ` Kaz Kylheku
2002-01-20 15:15                                           ` Software Scavenger
2002-01-21  1:42                                         ` Richard Riehle
2002-01-21  9:52                                           ` Hyman Rosen
2002-01-21 16:38                                             ` Richard Riehle
2002-01-21 20:30                                             ` Kaz Kylheku
2002-01-22  5:35                                             ` Raffael Cavallaro
2002-01-18 18:44                                   ` Simon Willcocks
2002-01-22 17:01                                     ` Hyman Rosen
2002-01-22 21:59                                       ` Bruce Hoult
2002-01-22 22:08                                         ` Hyman Rosen
2002-01-22 23:22                                           ` Kenny Tilton
2002-01-23 21:12                                             ` Hyman Rosen
2002-01-23 22:24                                               ` Tim Bradshaw
2002-01-24  0:15                                               ` Kenny Tilton
2002-01-24  8:14                                                 ` Hyman Rosen
2002-01-24 16:50                                                   ` Canconical C++ assignment (was Re: True faiths ...) Ray Blaak
2002-01-23  2:26                                           ` True faiths ( was Re: The true faith ) Bruce Hoult
2002-01-23 17:49                                             ` Richard Riehle [this message]
2002-01-22 22:09                                         ` Jim Rogers
2002-01-22 22:54                                           ` Kaz Kylheku
2002-01-22 23:47                                             ` Jim Rogers
2002-01-23  0:08                                               ` Ada SDL Eric Merritt
2002-01-23  1:39                                                 ` Rajat Datta
2002-01-23 10:52                                                 ` Preben Randhol
2002-01-23 13:59                                                   ` Eric Merritt
2002-01-23 16:48                                                     ` Preben Randhol
2002-01-23 16:01                                           ` True faiths ( was Re: The true faith ) Greg C
2002-01-26  0:40                                           ` AG
2002-02-11  7:18                                             ` David Combs
2002-02-11 17:50                                               ` Ray Blaak
2002-02-11 20:13                                               ` Kaz Kylheku
2002-02-13 21:17                                               ` Tom Hawker
2002-01-23 17:45                                         ` Georg Bauhaus
2002-01-18 19:36                                   ` Bruce Hoult
2002-01-18 19:57                                     ` Kaz Kylheku
2002-01-18 19:58                                     ` Marc Spitzer
2002-01-18 20:11                                       ` Ed Falis
2002-01-18 22:14                                         ` Kenny Tilton
2002-01-19  2:46                                           ` Thomas F. Burdick
2002-01-19  7:32                                     ` av1474
2002-02-13 23:12                                 ` Tom Hawker
2002-01-14 11:42                               ` Kevin McFarlane
2002-01-12  2:31                         ` Victor B. Putz
2002-01-12  3:56                         ` Kenny Tilton
2002-01-12  5:49                           ` israel r t
2002-01-12  6:04                             ` Thaddeus L Olczyk
2002-01-12  8:42                               ` Friedrich Dominicus
2002-01-12 15:44                             ` Andreas Bogk
2002-01-14 13:52                             ` Georg Bauhaus
2002-01-12 19:39                           ` Doug Hockin
2002-01-12 19:49                             ` Thaddeus L Olczyk
2002-01-12 20:14                             ` Kenny Tilton
2002-01-12 22:45                               ` Fernando Rodr�guez
2002-01-13  1:03                               ` Thomas F. Burdick
2002-01-13  5:24                                 ` Kenny Tilton
2002-01-12 15:58                         ` Preben Randhol
2002-01-12 16:18                           ` Nils Goesche
2002-01-12 17:03                             ` Thomas F. Burdick
2002-01-12 17:56                               ` Christopher Browne
2002-01-13  0:52                                 ` Thomas F. Burdick
2002-01-13 18:17                                   ` Nils Goesche
2002-01-13 19:04                                     ` Thomas F. Burdick
2002-01-13 19:26                                       ` James A. Robertson
2002-01-13 20:40                                         ` Nils Goesche
2002-01-13 20:43                                     ` Andreas Bogk
2002-01-13 19:05                             ` Preben Randhol
2002-01-13 19:20                               ` Preben Randhol
2002-01-16 12:00                           ` Christian Lynbech
     [not found]                       ` <9jtu3u8cq92b05j47uat3412tok6hq <3C409A34.7DE61ACB@nyc.rr.com>
2002-01-13 15:23                         ` Patrick Doyle
2002-01-13 16:29                           ` Dr. Edmund Weitz
     [not found]                       ` <9jtu3u8cq92b05j47uat3412tok6hq <i1t28.632$XG4.38637@news2.calgary.shaw.ca>
2002-01-22 14:25                         ` Copying semantics molehill (was Re: True faiths) Patrick Doyle
2002-01-22 15:47                           ` Steven T Abell
2002-01-26 17:32                             ` Patrick Doyle
2002-01-22 18:00                           ` Kaz Kylheku
2002-01-26 17:37                             ` Patrick Doyle
2002-01-28  3:08                           ` Robert Dewar
2002-01-28 18:47                             ` Patrick Doyle
2002-01-23  1:43                       ` True faiths ( was Re: The true faith ) Larry Kilgallen
     [not found]                       ` <9jtu3u8cq92b05j47uOrganization: LJK Software <FfppBdBcNxcL@eisner.encompasserve.org>
2002-01-23  2:04                         ` Jim Rogers
2002-01-23 17:02                           ` Darren New
replies disabled

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