Article View: comp.lang.c.moderated
Article #2423Re: references wanted
From: news
Date: Thu, 28 Mar 1996 00:03
Date: Thu, 28 Mar 1996 00:03
17 lines
1089 bytes
1089 bytes
In article <4ja3of$p7m@solutions.solon.com> Chris Hockett <75024.3236@CompuServe.COM> writes: >What is wrong with typecasting NULL to whatever type you are >testing against? > >i.e. > >tMyType *ptr; > >if(ptr == (tMyType *) NULL) > ... > Nothing is *wrong* with it. However, some of us find that it is just extra clutter. It may take a moment longer to see what is being expressed. It is a little like adding comments to source. Too few and they reader spends too much time analysing to see what you are trying to do. Too many, and the actual program gets hidden, and he can't see why it doesn't do what the comments say it should.
Technical Details
Message-ID:
<4jcl0d$a8l@solutions.solon.com>Path:
arc1-ca.pugleaf.net!solon.com!not-for-mailReferences:
<4imak1$e0j@solutions.solon.com> <4ja3of$p7m@solutions.solon.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail From: news@Thinkage.On.CA Newsgroups: comp.lang.c.moderated Subject: Re: references wanted Date: 27 Mar 1996 18:03:25 -0600 Organization: Thinkage Ltd. Sender: clc@solutions.solon.com Approved: clc@solutions.solon.com Message-ID: <4jcl0d$a8l@solutions.solon.com> References: <4imak1$e0j@solutions.solon.com> <4ja3of$p7m@solutions.solon.com> NNTP-Posting-Host: solutions.solon.com