From ... From: Erik Naggum Subject: Re: Newbie questions Date: 1999/05/05 Message-ID: <3134853317084191_-_@naggum.no>#1/1 X-Deja-AN: 474124539 References: <87btg5pb1y.fsf@2xtreme.net> <372dc20d.11142383@news.select.net> <37326ec5.11965212@news.select.net> <87g15ee8ss.fsf@foobar.orion.no> <372e265f.2137369@news.select.net> <87d80hdy1t.fsf@foobar.orion.no> <372fb91b.39706364@news.select.net> <87aevldw62.fsf@foobar.orion.no> <7gnhjt$p9q$1@nnrp1.dejanews.com> <4ogk0a72c.fsf@beta.franz.com> <37326dd3.5537740@news.select.net> mail-copies-to: never Organization: Naggum Software; +47 8800 8879; http://www.naggum.no Newsgroups: comp.ai,comp.lang.lisp * joshs@removethisbeforesending.cetasoft.com (Joshua Scholar) | The overall point is that type checking saves you from tons and tons of | late night typos and logic errors. well, type checking is necessary, but it appears that you don't know the difference between compile-time and run-time type checking, and assume that without compile-time type checking, there wouldn't be any. _that_ would be a source of tons and tons of typos and logic errors. however, the ridiculously simple-minded static type checking in C++ restrict you to a single line of inheritance, has no universal supertype, and offers no way to know the type of an object at run-time except by embedding it in a class and using RTTI. that is sufficiently inconvenient that the customary way to deal with multiple types of return values is to use an "invalid value", like the infamous NULL pointer. | Passing the wrong parameter, parameters in the wrong order, the wrong | subfield etc. are common typos and often caught by the compiler - | especially if you design your class interfaces to catch as much as | possible. In code that rarely runs or isn't expected to run under normal | conditions, this sort of correctness checking is very important. it sounds like you think you're telling people something new. why? this is so obvious it's been taken care of in much better than to require the programmer to declare the types of _all_ objects _explicitly_, which is, unsurprisingly, a major source of typos and logic errors, not to mention recompilation and header file (interface) changes that need to propagate to other team members. oh, by the way, since I see your favorite argument coming: knowing C++ is part of growing up. discarding C++ is a matter of course once you have grown up. explicit type declarations is useful for new programmers the same way bicycles for kids have support wheels. few kids argue against their removal. #:Erik