Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uupsi!sunic!fuug!news.funet.fi!tukki.jyu.fi!sakkinen From: sakkinen@jyu.fi (Markku Sakkinen) Newsgroups: comp.lang.misc Subject: Re: Run-time Type Errors in Smalltalk Message-ID: <1991May21.094937.25573@jyu.fi> Date: 21 May 91 09:49:37 GMT References: <1991May20.172441.780@csc.canterbury.ac.nz> Reply-To: sakkinen@jytko.jyu.fi (Markku Sakkinen) Organization: University of Jyvaskyla, Finland Lines: 54 In article rockwell@socrates.umd.edu (Raul Rockwell) writes: > ... >Michael Chisnall: > [ see previous article for CACM reference and background ] > > I think that a distinction that it may be useful to draw here is > between declarative languages (e.g. prolog, ML, hope, miranda, > smalltalk) which have a highly modular structure, and > non-declarative languages (such as pascal, fortran, cobol, ada) > ... BTW, Smalltalk declarative?! Prolog has a modular structure?! >Hmm... yes. The way I remember this group of threads started off with >the assertion that dynamically typed languages were less error prone >than statically typed languages because (paraphrasing slightly) >dynamically typed languages are more declarative in nature. > >Maybe the emphasis should have been on declaratively typed languages >vs. non-declaratively typed languages :-)? "Started off" at some point of time? Hasn't it been going on since time immemorial? :-) Anyway, it looks like a silly statement (has anybody really made it?) that having to _declare_ the types of variables would make a language _less_ declarative. > ... >Am I the only one interested in pointing out that an infinite loop is >a type error? So it seems: you have probably insisted on that some 10 times during the last few months without getting many supporters. Most people evidently feel (like myself) that lumping too much into the concept 'type error' would make it too general to be interestingly different from 'error'. > Consider a recent bug I encountered: a 'continue' inside >an 'if' statement which should have been outside -- without the >continue the code would occasionally fall through to a different state >and would never terminate. Yeah, that was in C, but testing is the >only real good way to find statements out of order. What is the connection of this programming mistake with _type_ errors? And how does it confirm your opinion that "testing is the only real good way"? Markku Sakkinen Department of Computer Science and Information Systems University of Jyvaskyla (a's with umlauts) PL 35 SF-40351 Jyvaskyla (umlauts again) Finland SAKKINEN@FINJYU.bitnet (alternative network address)