Thread: New typecast Style in C++?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #18
    Registered User
    Join Date
    Nov 2002
    Posts
    491
    Pointers ARE a good thing in the hands of a skilled programmer.
    I find this argument to be fairly weak, personnely. Anything can be made to be good in the hands of a skilled individual. I think it is probably more important to discuss how much work it takes to prove the correctness of something. That way you can avoid how skilled the user of it is and focus on how well the tool solves your problem. Pointers are impossible to prove teh correctness of them when using. I don't mean prove correctness in the mathematical sense (since most programming langauges lack this, except maybe ML's). But rather, how much work it takes to be reasonbly sure you have not commited undefined behavior somewhere. And with pointers you, really, cannot be 100% sure of this. Another problem is, god forbid this magically skilled programmer, makes an error, pointers are very difficult to track down the error and properly solve it.

    I wouldn't say casting is bad at all -- you might as well say inheritence and polymorphism are bad and don't do either.
    Polymorphism and inheritence can be implemented without allowing one to perform undefined behavior (i.e safely). Casts do not gurantee you have performed a safe operation, this is why langauges such as ML and python do not have any concept of casting, so i think your comparision is poor.
    Last edited by orbitz; 09-19-2005 at 09:35 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. WM_CAPTION causing CreateWindowEx() to fail.
    By Necrofear in forum Windows Programming
    Replies: 8
    Last Post: 04-06-2007, 08:23 AM
  2. Button handler
    By Nephiroth in forum Windows Programming
    Replies: 8
    Last Post: 03-12-2006, 06:23 AM
  3. Which style of if loops is most common?
    By dwks in forum A Brief History of Cprogramming.com
    Replies: 38
    Last Post: 08-25-2005, 03:18 PM
  4. WS_EX_COMPOSITED style (double buffering) problems
    By JasonD in forum Windows Programming
    Replies: 2
    Last Post: 10-12-2004, 11:21 AM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM