Re: Flexible arrays - v confused



Keith Thompson wrote:
websnarf@xxxxxxxxx writes:
Keith Thompson wrote:
[...]
Why do you uselessly cast the result of malloc()?

Because I like to use automatic error detection tools when I program,
and that includes using a C++ compiler (which has stricter type
checking). It means I have to conceed to things like the above in
order to gain the benefit of stronger type checking elsewhere in my
programs.

So if you take the opposite point of view, would it be fair to say that
you avoid things like Lint and ignore warning messages coming from your
compiler? Or are you saying that anything superfluous, like comments
and whitespace, should be eradicated from code?

Yes, absolutely, because you're always right and anyone who disagrees
with you must be a complete idiot. Thank you for bringing this to my
attention.

You intentionally instigated this. You used the language "uselessly"
and your canned argument against this cast is well known to me, and you
know that. So you respond with this question with the intention of
laying this pathetic trap. But, if you've ever bothered to read my
posts, you've known my counter argument before this post.

My reducto ad absurdum in the second paragraph is meant to address the
position "if you take the opposite point of view". If you understood
what I was saying rather than taking an antagonistic-only stance you
would have realized that what I was saying is that the problem is that
you have not clarified the basis for your point of view, and unless its
insane the ball is in your court to explain why you want to remove this
"useless" cast.

--
Paul Hsieh
http://www.pobox.com/~qed/
http://bstring.sf.net/

.



Relevant Pages

  • Re: [Lit.] Buffer overruns
    ... > don't even have to bother swapping out the compiler. ... It does not take an adversary to create a security hole, ... And those errors abound. ... That is a far cry from saying that it is secure and can be ...
    (sci.crypt)
  • Re: C# Nullable types
    ... string x = null; ... compiler that by using the language specific word called "null". ... so we are given a keyword to state our intentions as the ... I am saying that I don't want x to have any value and I am "ok" with that. ...
    (microsoft.public.dotnet.framework)
  • Re: .NET 3.0
    ... I know that CodeGear wants to emphasize that the Delphi 2007 .NET compiler is a CLI 2.0 compiler but IMO there is little or nothing to gained marketing-wise by engaging in long-winded arguments such as the one in this thread saying that somehow 3.0 and 3.5 are not new versions. ... Perhaps CodeGear should publish a white paper with examples of how to use the Delphi for .NET 2007 compiler and IDE to generate useful applications utilizing the features of .NET 3.0 and 3.5. ...
    (borland.public.delphi.non-technical)
  • Re: Ahead of "main"?
    ... On Mon, 30 Apr 2007 06:00:41 GMT, Chris Dollin ... declare functions within main. ... I'm not sure /exactly/ what you're saying; ... the compiler "could" do such checking. ...
    (comp.lang.c)
  • Re: Flexible arrays - v confused
    ... Because I like to use automatic error detection tools when I program, ... and that includes using a C++ compiler (which has stricter type ...
    (comp.lang.c)