home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / forth / 3964 < prev    next >
Encoding:
Internet Message Format  |  1993-01-23  |  2.6 KB

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