Path: utzoo!news-server.csri.toronto.edu!rutgers!ucsd!sdd.hp.com!spool.mu.edu!uunet!mcsun!ukc!edcastle!aipdc From: aipdc@castle.ed.ac.uk (Paul Crowley) Newsgroups: comp.lang.misc Subject: Re: Dynamic typing (part 3) Message-ID: <9106@castle.ed.ac.uk> Date: 12 Mar 91 23:50:48 GMT References: <602@optima.cs.arizona.edu> Organization: Edinburgh University Lines: 33 I'm going to split languages in two by type extensibility. In C and ML, you can explicitly make up a new type from old types: a widget is made up of two foos and a bar. In Logo, there are only three types: words, numbers, and lists. If you want to define an imaginary number, you could use a list of two integers. If you want to define a UNIX-style time as a list of two integers [secs, usecs], you can do that too. If you accidentally feed an imaginary number to a function that wants a date, the language won't say a word. Prolog behaves this way too. What are the words for these two? (I know that if you really wanted to, you could preface every imaginary list with a typename, and write functions that checked that the elements of these lists were the types they were supposed to be. This means that the types of all the elements of a large structure are checked often. Doubleplusungood.) Are these two strong and weak typing? Also, some languages do type-checking at compile-time, and some at run-time. Some (ML and others) typecheck at compile-time _but_ it does all the work itself. Run-time typecheckers maintain the type of a value with the value itself, and on each operation checks that the operation is an appropriate thing to do. Are these two static and dynamic typechecking? Thanks, and sorry for asking here but many people have said "X is the wrong word for Y" that I felt that the only people who could tell me what the words mean in the debate were the participants. ____ \/ o\ Paul Crowley aipdc@uk.ac.ed.castle \ / /\__/ Part straight. Part gay. All queer. \/