Path: utzoo!attcan!uunet!fernwood!apple!olivea!mintaka!bloom-beacon!eru!hagbard!sunic!kth.se!news From: d87-mra@dront.nada.kth.se (Magnus Ramstr|m) Newsgroups: comp.object Subject: Re: Do we really need types in OOPL's? Message-ID: <1990Sep28.070257.8676@kth.se> Date: 28 Sep 90 07:02:57 GMT References: <0yw10qr@Unify.Com> <411@eiffel.UUCP> <736@tetrauk.UUCP> <1990Sep25.135145.3460@kth.se> <3832@osc.COM> Organization: Royal Institute of Technology, Stockholm, Sweden Lines: 31 In article <3832@osc.COM> tma@osc.UUCP (Tim Atkins) writes: >In article <1990Sep25.135145.3460@kth.se> d87-mra@dront.nada.kth.se (Magnus Ramstr|m) writes: > >> >>This can be achieved in a strongly typed OOPL by having one class as the >>ancestor of all other classes, letting your variables refer to that class >>and using virtual messages only. Therefore a strongly typed OOPL can >>be transformed into a weakly typed one, while the reverse is not true. > > This is not really the case. In a dynamically typed language >any message can be sent to any object. In a staticly typed language with >a common base class only messages understood by the base class may be sent. > Ok, I was unclear. The statement above is ment to be theoretical. The base class must of course understand all messages, if only by invoking empty methods. > > I also disagree that "strong" typing cannot be simulated in a >dynamically typed language. Type or even protocol tests can be inserted at >will and could probably be automated in fairly clever and efficient fashion. >handling these cases. > Again, theoretical. I wrote transform into, not simulate. A dynamically typed language can not provide compile-time type checking, as I am sure you would agree with. But, my article was unclear on the details, and I thank you for pointing this out. > >Tim Atkins > d87-mra@nada.kth.se (Magnus Ramstr|m). Student @ Dep. of Computer Science.