Newsgroups: comp.lang.misc
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!batcomputer!cornell!rochester!kodak!islsun!cok
From: cok@islsun.Kodak.COM (David Cok)
Subject: Re: Run-time Type Errors in Smalltalk (was Re: blip (was...))
Message-ID: <1991Apr5.152736.22353@kodak.kodak.com>
Sender: news@kodak.kodak.com
Organization: Eastman Kodak Co., Rochester, NY
References: <PX.91Apr1225918@hal.fct.unl.pt> <887@puck.mrcu> <2367@m1.cs.man.ac.uk>
Date: Fri, 5 Apr 91 15:27:36 GMT

In article <2367@m1.cs.man.ac.uk> mario@cs.man.ac.uk (Mario Wolczko) writes:
>In article <887@puck.mrcu>, paj@mrcu (Paul Johnson) writes:
>> Sorry, I am still not convinced.  I am currently programming in
>> Eiffel, and changing my mind about a type is not something I often do.
>> Also the type declarations carry information which affects the
>> execution of the rest of the program.  Hence other parts of the
>> program will need changing as well.  It seems to me that this will
>> only result from a fairly major rewrite of some part of the code.
>
>This could be a self-fulfilling statement, ie you don't change your
>mind about types because you know it's going to be hard work to fix
>the type declarations up, whereas in a declarationless language
>sorting out the declarations doesn't arise.

I've never known a case where one had to go through a program and fix up all
the types.  In Fortran or Pascal one might have to, but in C, use descriptive
typedef names -- then all one needs to do to change the types of those 
variables is to change the definition of the typedef.  This is very like 
changing the class definition in any dynamically typed language.

Historical note:
I vaguely remember from some early programming class ages ago that declarations
were touted not as a way to provide type-checking, but to save the
programmer from misspelling variable names (by requiring that each one be
written at least twice in a program)! FORTRAN's implicit declarations
were forbidden in that class.

David R. Cok
Eastman Kodak Company -- Imaging Science Lab
cok@Kodak.COM

