Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!odi!dlw From: dlw@odi.com (Dan Weinreb) Newsgroups: comp.lang.c++ Subject: Re: Why ask an object its type?? (was: libraries, compilers, class...) Message-ID: <1990Oct5.044934.11501@odi.com> Date: 5 Oct 90 04:49:34 GMT References: <995@halley.UUCP> <57751@microsoft.UUCP> Reply-To: dlw@odi.com Organization: Object Design, Inc. Lines: 21 In-Reply-To: cline@cheetah.ece.clarkson.edu's message of 4 Oct 90 18:19:42 GMT In article cline@cheetah.ece.clarkson.edu (Marshall Cline) writes: [1] you might ask an object its type to determine if a particular message is applicable. This is one of the worst possible (mis)uses of the CRO concept, since it is the antithesis of strong typing. However, it's a very useful ability for an interactive debugger, or an interactive data-structure browser. A browser must be written on Monday to work on data types that have not even been thought of by a programmer until Tuesday. [4] another respondent indicated that it's easier to compile weakly typed OOPLs and hot linking is easier, since all of the type resolution is pushed off until runtime. No, what he said was that it is easier to build an interactive, incremental programming environment if you can determine types at runtime than if all type information is lost at compile time. That's not the same thing. There is a lot more to such an environment than "compile a bunch of text files and produce an executable file, load, and go".