comp.lang.ada
 help / color / mirror / Atom feed
From: Darren New <dnew@san.rr.com>
Subject: Re: Is strong typing worth the cost?
Date: Thu, 02 May 2002 16:09:58 GMT
Date: 2002-05-02T16:09:58+00:00	[thread overview]
Message-ID: <3CD1652C.5A4736@san.rr.com> (raw)
In-Reply-To: aap8eg$gt5$1@nh.pace.co.uk

Marin David Condic wrote:
> rather than the programmer... etc...) If what you want to test is the
> relative efficiency of this philosophy as compared to the C philosophy, then
> you'd have to introduce them both to the same development process. Anything
> else and you've got a worthless experiment.

Sure. Here's my problem with the whole "scientific experiment" bit.

It's obvious that a trivial way to do the experiment would be to use two
versions of Ada, one where you get to use the whole language, the other
where you get to only use the base types and all the run-time checking
is turned off at compile-time. That would seem to be about as close as
you can come to having the same language both strongly and weakly typed.
Maybe C vs C+Lint would be the other way to go.

But obviously, the second version of Ada is a subset of the first
version of Ada. Running off the end of an array or overflowing a
variable or whatever is going to be an error. It won't be caught without
the run-time checking, but it's still an error. So the run-time checking
doesn't really give you any benefit when the program is correct
(assuming you don't intentionally throw and later catch constraint
errors or something rather than returning inside an "if", say). 

So clearly the first group *could* be just as productive as the second
group by simply ignoring the range checks in Ada, and *will* be more
productive because the errors are caught earlier.

My point being that it sounds like a pretty worthless experiment,
because it's so constrained that the outcome is obvious. The interesting
part is to ask what using a language with weak typing buys you. If the
language with weak typing is Ada, it doesn't buy you anything. If the
language with weak typing is C, it buys you programmer experience, more
populous newgroups, a plethora of syntax-directed editors, code
generators for GUIs, zero-effort interfaces to third-party libraries,
etc etc etc.
 
> I don't know of any studies that introduced Ada into a process that used to
> use Smalltalk, etc. (or the other way around) and demonstrated any change in
> productivity or quality. It would be interesting to find out, but given the
> more niche-market characteristics of the above languages, its harder to find
> case studies - real or potential.

Errr, this is odd. What do you think the "niche market" is for Smalltalk
or Forth? Do you really think Smalltalk's market is more of a "niche"
than Ada's?

Now, if you'd said that Atlas is a niche language, or Postscript is a
niche language, or YACC is a niche language, I'd agree with you. But by
what criterion is Smalltalk or Forth a niche language?

> > > standard disclaimer: "All Other Things Being Equal" :-)
> >
> > And the problem is that in reality, all other things aren't equal. A
> > language specifically designed to be weakly typed, or dynamically typed,
> > or something like that isn't going to be equal to Ada in most other
> > ways. If all you know are the "romance languages" of programming
> > (procedural imperative statically-typed languages), this may not be as
> > obvious.
> >
> That's one big reason that it is hard to study the impact of language, or
> some specific language characteristic, on productivity and quality. 

I'd say it's easy to determine the impact of language choice on
productivity and quality. However, I'd say that things tangential to the
language may have a serious effect. For example, it's possible that
Smalltalk's model of the environment (in terms of debugging, code
editting, "workspace"-style program management, etc) make it far more
productive in some situations than Ada is. However, it's not independent
of the language, because Ada can't do the kinds of things that Smalltalk
does in that regard.

> It is
> unbelievably hard to make all other things equal. This would be true even
> within the "romance languages" so its just plain hard to do anything that
> doesn't immediately come under fire as not being scientific or at least
> seriously flawed.

Again, I'd say it's easy to evaluate the choice of language+environment
on programming productivity, and trying to evaluate a question of
language and discarding all the environmental differences *caused* by
the difference in the language is just silly.
 
> have to manually code those checks no matter what language you use. So is
> the requirement to do both validity checks and sanity checks? If so, weak
> typing loses.

No, I'd think that putting in a requirement to do sanity checks would be
silly. The requirements on a program ought to be based on the input and
output. Otherwise, why not just write in a requirement that you have to
use a language where all sanity checks are done by the compiler?
 
> You're bringing up process - not language. Process may be interesting, but I
> don't think it has much to do with the original question.

Except that I can't imagine the XP process working with Ada, for
example, so it is relevant. Asking about the typing independent of the
process is like asking whether it's better to travel by car or airplane
without asking how far you're going.

Take as an extreme example, if your goal is to save programming dollars
... is it better to spend money on Ada training, or is it better to
spend money to put programmers in offices with doors they can close
instead of cubicles? If your bottom line is dollars, it's not obvious
that checking strong against weak typing is going to tell you anything.
If you're just interested in strong vs weak typing, well, anything you
can do with weak typing you can also do with strong typing, so limiting
yourself to a language that only supports one is going to be at best no
better than one that supports both.

-- 
Darren New 
San Diego, CA, USA (PST). Cryptokeys on demand.
   The 90/10 rule of toothpaste: the last 10% of 
         the tube lasts as long as the first 90%.



  reply	other threads:[~2002-05-02 16:09 UTC|newest]

Thread overview: 166+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-28 17:07 Is strong typing worth the cost? dmjones
2002-04-29 15:22 ` Ted Dennison
2002-04-29 15:53   ` Pat Rogers
2002-04-29 18:37   ` dmjones
2002-04-29 18:50     ` Pat Rogers
2002-04-29 19:00     ` Darren New
2002-04-30 11:50     ` Marc A. Criley
2002-04-30 13:24       ` dmjones
2002-04-30 15:03         ` Jim Rogers
2002-04-30 16:48           ` dmjones
2002-04-30 17:45             ` Marin David Condic
2002-05-01 21:36               ` Brian Gaffney
2002-04-30 18:20             ` tmoran
2002-04-30 19:00               ` Marin David Condic
2002-05-01 15:20                 ` dmjones
2002-05-01 16:07                   ` Marin David Condic
2002-05-02  5:00                     ` Simon Wright
2002-05-02  7:55                   ` Martin Dowie
2002-05-01 16:51                 ` Darren New
2002-05-01 17:25                   ` Marin David Condic
2002-05-02 16:09                     ` Darren New [this message]
2002-05-03 13:46                       ` Marin David Condic
2002-05-03 22:54                         ` Darren New
2002-05-01 18:22                 ` tmoran
2002-05-01 18:50                   ` Marin David Condic
2002-05-01 20:30                   ` Dan Andreatta
2002-05-01 21:47                     ` Larry Kilgallen
2002-05-02 15:43                     ` Wes Groleau
2002-04-30 19:01             ` Preben Randhol
2002-04-30 19:28               ` Preben Randhol
2002-04-30 20:20                 ` Marin David Condic
2002-05-01  8:36                   ` Pascal Obry
2002-05-01 11:50                     ` Gary Scott
2002-05-01 13:39                       ` Marin David Condic
2002-05-02  2:24                         ` Darren New
2002-05-02 15:47                           ` Wes Groleau
2002-05-02 16:37                             ` Darren New
2002-05-02 19:59                               ` Chad R. Meiners
2002-05-02 21:48                                 ` Darren New
2002-05-02 22:16                                   ` Wes Groleau
2002-05-02 23:52                                     ` Darren New
2002-05-03  0:17                                       ` Aidan Skinner
2002-05-03  0:31                                         ` Aidan Skinner
2002-05-03 15:10                                       ` Wes Groleau
2002-05-03 16:06                                         ` Darren New
2002-05-06 16:37                                           ` Wes Groleau
2002-05-06 17:40                                             ` Darren New
2002-05-07  2:06                                               ` tmoran
2002-05-07 15:21                                                 ` Darren New
2002-05-07 19:11                                                   ` Preben Randhol
2002-05-03 15:31                                       ` Wes Groleau
2002-05-03 16:21                                         ` Darren New
2002-05-06 15:33                                           ` Wes Groleau
2002-05-06 16:30                                             ` Darren New
2002-05-03 15:38                                       ` Wes Groleau
2002-05-03 16:07                                         ` Marin David Condic
2002-05-03 19:51                                       ` Randy Brukardt
2002-05-03 20:55                                         ` Ed Falis
2002-05-04 16:34                                           ` Brian Rogoff
2002-05-03  0:22                                   ` Chad R. Meiners
2002-05-03  0:48                                     ` Darren New
2002-05-03 12:11                                       ` Chad R. Meiners
2002-05-03 14:27                                         ` Marin David Condic
2002-05-04  0:23                                           ` Darren New
2002-05-06 17:54                                             ` Marin David Condic
2002-05-07 15:28                                               ` Darren New
2002-05-07 17:54                                                 ` Chad R. Meiners
2002-05-03 14:01                           ` Marin David Condic
2002-05-03 23:41                             ` Gary Scott
2002-05-06 18:05                               ` Marin David Condic
2002-05-01 14:19                       ` Pascal Obry
2002-05-01 13:27                     ` Marin David Condic
2002-05-01 14:28                     ` Wes Groleau
2002-05-01 15:25                       ` Marin David Condic
2002-05-02 15:51                       ` Wes Groleau
2002-05-02 16:47                         ` Gary Scott
2002-05-02 18:24                           ` Preben Randhol
2002-05-02 18:48                             ` Dan Nagle
2002-05-03  8:44                               ` Preben Randhol
2002-05-03 10:17                                 ` Gary Scott
2002-05-03 10:48                                   ` Preben Randhol
2002-05-03 13:13                                     ` Gary Scott
2002-05-03 14:40                                       ` Preben Randhol
2002-05-03 14:32                                 ` Dan Nagle
2002-05-02 17:26                         ` Larry Hazel
2002-05-02 18:12                           ` Wes Groleau
2002-05-02 18:40                             ` Preben Randhol
2002-05-02 21:54                               ` Wes Groleau
2002-05-02 18:54                           ` Gary Scott
2002-05-02 21:56                             ` Wes Groleau
2002-05-26 17:56                           ` Robert I. Eachus
2002-05-26 22:04                             ` Brian Rogoff
2002-05-27 23:26                               ` Robert I. Eachus
2002-05-28 15:26                             ` Marin David Condic
2002-05-02 11:30                     ` Larry Kilgallen
     [not found]                     ` <3CCFD76A.A60BB9Organization: LJK Software <Sb8D81Zz$HcE@eisner.encompasserve.org>
2002-05-02 16:12                       ` Darren New
2002-04-30 21:17             ` Jim Rogers
2002-04-30 21:30               ` Darren New
2002-05-07 12:17           ` Colin Paul Gloster
2002-05-07 22:11             ` Hyman Rosen
2002-04-30 15:39         ` Marin David Condic
2002-05-01 14:39           ` Wes Groleau
2002-05-01 15:42             ` Marin David Condic
2002-05-02 20:17               ` Jeffrey Carter
2002-05-03 14:40                 ` Marin David Condic
2002-05-26 16:51               ` Robert I. Eachus
2002-05-28 15:16                 ` Marin David Condic
2002-04-30 17:02         ` Chad R. Meiners
2002-04-30 17:27           ` Darren New
2002-04-30 20:15             ` Chad R. Meiners
2002-04-30 20:42               ` Marin David Condic
2002-05-02 12:00                 ` Marc A. Criley
2002-05-02 15:20                   ` Larry Kilgallen
2002-05-02 16:19                   ` Darren New
2002-05-03 14:44                   ` Marin David Condic
2002-04-30 21:40               ` Darren New
2002-04-30 21:43             ` tmoran
2002-04-30 22:38               ` Darren New
2002-04-30 18:04           ` Marin David Condic
2002-04-30 17:27         ` Jeffrey Carter
2002-04-30 17:35         ` Marc A. Criley
2002-05-01  4:01         ` Richard Riehle
2002-04-29 16:02 ` Marin David Condic
2002-05-01  0:31 ` dmjones
2002-05-01  8:05   ` Preben Randhol
2002-05-01  8:07   ` Preben Randhol
2002-05-01 14:32   ` Mike Silva
2002-05-01 15:52     ` Marin David Condic
2002-05-02 16:17     ` Wes Groleau
2002-05-02 18:53       ` tmoran
2002-05-02 18:58         ` Pat Rogers
2002-05-01 15:35   ` Jim Rogers
2002-05-01 16:17     ` Marin David Condic
2002-05-01 18:42     ` dmjones
2002-05-01 20:12       ` Dan Andreatta
2002-05-01 20:19       ` Darren New
2002-05-01 22:17         ` Jeffrey Carter
2002-05-02 16:18           ` Wes Groleau
2002-05-01 21:46       ` Larry Kilgallen
2002-05-01 22:21       ` Jeffrey Carter
2002-05-02 11:28         ` John English
2002-05-02 16:18           ` Darren New
2002-05-02 16:41             ` Larry Kilgallen
2002-05-02 18:28               ` Preben Randhol
2002-05-02 19:53                 ` Larry Kilgallen
2002-05-03 12:12                 ` Andrzej Filip
2002-05-03 10:14             ` Georg Bauhaus
2002-05-26 22:46               ` Robert I. Eachus
2002-05-27  8:10           ` Florian Weimer
2002-05-01 22:47       ` Jim Rogers
2002-05-01 16:32   ` Jeffrey Carter
2002-05-01 17:59     ` Marin David Condic
2002-05-01 19:08     ` Wes Groleau
2002-05-01 21:10   ` Brian Gaffney
2002-05-03  2:45 ` dmjones
2002-05-03  7:59   ` Martin Dowie
2002-05-03  8:43     ` Preben Randhol
2002-05-03  8:55       ` Martin Dowie
2002-05-03  8:51   ` Preben Randhol
  -- strict thread matches above, loose matches on Subject: below --
2002-04-29 19:21 Beard, Frank [Contractor]
2002-04-29 20:15 ` dmjones
2002-04-29 23:26 Beard, Frank [Contractor]
2002-04-30 18:08 Beard, Frank [Contractor]
2002-05-01 11:07 ` David Gillon
2002-04-30 20:32 Beard, Frank [Contractor]
2002-04-30 21:34 Gralia, Mars  J.
replies disabled

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