Newsgroups: comp.object,comp.lang.smalltalk,comp.lang.ada
Path: cantaloupe.srv.cs.cmu.edu!europa.chnt.gtegsc.com!news.sprintlink.net!news.wwa.com!rcm!rmartin
From: rmartin@rcmcon.com (Robert Martin)
Subject: Re: Has C++ had its day?
References: <3q7tb1$1ct@holly.csv.warwick.ac.uk> <1995Jun12.135705.3580@merlin.hgc.edu> <3rsnp8$bqj@wally2.hti.net> <3s7ijs$jjb@gensym1.gensym.com> <DAJ73H.35M@world.std.com> <3sc5g3$hvl@gensym1.gensym.com>  <dewar.803869433@gnat> <NEWTNews.803919664.16092.sellers@sellers.sellers.com> <dewar.804000976@gnat> <3shs72$5hf@News1.mcs.com>
Organization: R. C. M. Consulting Inc. 708-918-1004
Date: Sun, 25 Jun 1995 17:27:18 GMT
Message-ID: <1995Jun25.172718.5312@rcmcon.com>
Lines: 57
Xref: glinda.oz.cs.cmu.edu comp.object:33597 comp.lang.smalltalk:25004 comp.lang.ada:31714

jim.fleming@bytes.com (Jim Fleming) writes:

>It does not make sense for a compiler to take mandates from
>a programmer, to agonize over making sure every type matches and then
>to throw this information away. You end up with very brittle programs
>   ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>if you take this path.

No, actually you don't.  Although I really like the RTTI features of
C++, and would not want to do without them,  I used C++ for several
years before they were available.  And I still managed to write some
very flexible programs.

A statically typed language provides for the *self consistency* of the
program.  A program that is *self consistent* is not necessarily
brittle.  It is free to flex in any direction that does not violate
the consistency imposed by the types.

>If static type checking is considered a hint, and if the information
>is carried through to the run-time, then advanced techniques can be used
>as systems evolve to make systems run "faster" not slower, to make
>systems more maintainable not less, and most importantly it allows the
>static world to coexist with the dynamic world and you do not end up
>with the brittle systems mandated by a rigid, narrow-minded, view that
>static type checking encourages.

Maybe you can describe some of these "advanced techniques"?

>In my opinion, computers have a far better capacity than humans to
>figure out complex relationships between things. 

That is exactly what computers are really bad at, and what humans are
really good at.  

>Why saddle the human
>programmer with the job of designing a system where every i is dotted
>and t is crossed when it comes to matching types. Why not allow the
>programmer to precisely encode their intentions, to preserve those
>intentions and then to have the run-time system not only enforce those
>intentions but also assist (along with the compiler) in verifying that
>the intentions are honored.

Because of the word you just used.  'precisely'.  Aren't you just
moving precision from the 'typing' arena to some other arena?  Haven't
you now put the burden upon the programmer to resolve ambiguities of
'type'.  

>Why not use the whole system to verify software...not just a compiler...

I think if you go to any place where software is being produced, you
will find that they do just that.  Nobody I know of considers that the
program is done just because it compiles without errors.
-- 
Robert Martin       | Design Consulting   | Training courses offered:
Object Mentor Assoc.| rmartin@oma.com     |   Object Oriented Analysis
2080 Cranbrook Rd.  | Tel: (708) 918-1004 |   Object Oriented Design
Green Oaks IL 60048 | Fax: (708) 918-1023 |   C++
