home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!uknet!mucs!m1!bevan
- From: bevan@cs.man.ac.uk (Stephen J Bevan)
- Newsgroups: comp.lang.forth
- Subject: Re: forth type checker
- Message-ID: <BEVAN.93Jan22151333@panda.cs.man.ac.uk>
- Date: 22 Jan 93 15:13:33 GMT
- References: <1993Jan19.125525.17459@email.tuwien.ac.at> <1993Jan19.212029.15677@crd.ge.com>
- <1993Jan20.093607.20349@email.tuwien.ac.at>
- <1993Jan20.183012.1078@csi.uottawa.ca>
- <1993Jan21.082304.28301@email.tuwien.ac.at>
- Sender: news@cs.man.ac.uk
- Organization: Department of Computer Science, University of Manchester
- Lines: 39
- In-reply-to: anton@mips.complang.tuwien.ac.at's message of 21 Jan 93 08:23:04 GMT
-
- In article <1993Jan21.082304.28301@email.tuwien.ac.at> anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
- somebody writes:
- |> I mildly disagree: "strong" tends to refer to systems that attempt to
- |> forbid the type errors; the fact that they aren't PERFECTLY strong
- |> doesn't deny the ATTEMPT. "Weakly" typed languages tend either to
- |> either enforce few or no type errors.
-
- Unfortunately, the above makes no distinction between compile and
- run-time and so the attributes "strong" and "weak" have very little
- meaning.
-
- That would be alright, if the terms were used with these meanings.
- Unfortunately they aren't. Pascal, which (as usually implemented) has
- holes in it's type system, is usually called strongly typed, whereas
- Lisp, which has no holes, is usually called weakly typed (and some
- people even call it untyped).
-
- Which just shows that we are in a sorry state wrt categorisation of
- languages. All the rest of this is with a big IMHO :-
-
- Lisp is a strongly, latently typed language, whereas Pascal is
- generally a strongly, statically typed language. This means that they
- both ensure type safety, but Lisp does it at runtime whilst Pascal
- generally does it at compile time. The "hole" such that it is in the
- Pascal type system is in the _static_ type system, not the type system
- in general. I don't have the standard to hand, but the VDM definition
- of Pascal that I have in front of me does ensure that at runtime you
- are not allowed to access a field of a variant record unless the tag
- type is correct. As to "untyped" languages i.e. languages which
- generally don't enforce any type constraints, the only ones I can
- think of are BCPL and FORTH.
-
- These categories are not mutually exclusive and there is considerable
- scope for bluring around the edges. This mainly happens where the
- language doesn't have a standard (or the standard is written in a
- "natural" language) and so it is difficult to separate the language
- from its various implementations.
-
- bevan
-