From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,b87849933931bc93 X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,b87849933931bc93 X-Google-Attributes: gid103376,public X-Google-Thread: fac41,b87849933931bc93 X-Google-Attributes: gidfac41,public X-Google-Thread: 1111a3,5ee869da42505971 X-Google-Attributes: gid1111a3,public X-Google-Thread: 114809,b87849933931bc93 X-Google-Attributes: gid114809,public X-Google-Thread: 1108a1,b87849933931bc93 X-Google-Attributes: gid1108a1,public From: Luther Hampton Subject: Re: Combining dynamic and static typing Date: 1997/01/28 Message-ID: <32EEC441.4B7@erols.com>#1/1 X-Deja-AN: 212834359 references: <5celpp$n3r@csugrad.cs.vt.edu> <1997Jan28.160420.28915@schbbs.mot.com> content-type: text/plain; charset=us-ascii organization: Interactive Objects Inc. mime-version: 1.0 reply-to: lhampton@erols.com newsgroups: comp.lang.eiffel,comp.lang.ada,comp.lang.c++,comp.lang.smalltalk,comp.lang.objective-c,comp.object x-mailer: Mozilla 3.01Gold (WinNT; I) Date: 1997-01-28T00:00:00+00:00 List-Id: David L. Shang wrote: > > In article <5celpp$n3r@csugrad.cs.vt.edu> nurban@csugrad.cs.vt.edu (Nathan M. > Urban) writes: > > Thus, Objective-C gives you all the safety of C++'s static type > > checking, while retaining all the advantages of a dynamic language. > > The advantage of static type checking is type error prevention: > to prevent type errors before it can happen. > > Therefore, Objective-C cannot give the benefit of a static typing > system. Objective-C detects the type errors such as "Not a String" > at run-time. It does detection, not prevention! Detection is usually > not a solution to a problem. It is like an irresponsible doctor saying: > "Now I find what is wrong with you, it's your responsibility to figure > how to fix it. Want my suggetion? -- peace die -- crash!" > > David Shang You must use a different Objective-C than I do. The Objective-C compiler supplied by Next performs type checking to the maximum extent possible at compile time. It's only when the compiler encounters the type "id" that it gives up type checking. If you wrote your entire Objective-C program without referencing the type "id" (admittedly pretty impossible in the Next environment), you would get complete compile-time type checking. These errors would be reported as warnings, but reported nonetheless. There is runtime checking to, but it is hardly the only thing available. Luther Hampton