Thread: new standard

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    I really wanted the for each style loops --

  2. #2
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    Edit: You know what... it doesn't matter. It is your prediction, your rationale, your problem. I just hope people don't screw up by avoiding move semantics because of the same flimsy rationale.

    I said nothing of the sort.
    Well, from my perspective you didn't say anything else either.

    It's hard to get templates right for every case, good programmers don't avoid them.

    It's hard to get exceptions right, good programmers don't avoid them.

    No existing compiler handles templates perfectly, good programmers don't avoid them.

    Programmers abuse the simplest aspects of a language as readily as the complex ones.

    If you can move from a linear algorithm to a constant algorithm, you usually should.

    It is usually correct to start with a better algorithm than try to replace an algorithm used in an existing implementation.

    Some of the problems you are apparently worried about wouldn't even exist if the move overloads were required. (If every operation is non-throwing, the total is non-throwing.)

    Just like for exceptions and templates, if you use the right primitives, the correct implementation of the various move overloads is almost trivial. The problem is, if programmers don't implement the move overloads correctly, these primitives will not be available. By avoiding them, programmers guarantee their source can't be trusted in many contexts.

    It's just like coding under the assumption that you can avoid exceptions just because you don't personally employee them, you potentially break everything.

    Soma

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Standard efficiency
    By Jorl17 in forum C Programming
    Replies: 3
    Last Post: 06-18-2009, 11:48 AM
  2. Bug in iterator comparison in C++ standard?
    By steev in forum C++ Programming
    Replies: 14
    Last Post: 07-12-2008, 12:02 AM
  3. Abstract Base Class and References
    By Thantos in forum C++ Programming
    Replies: 9
    Last Post: 10-13-2004, 01:35 PM
  4. im extreamly new help
    By rigo305 in forum C++ Programming
    Replies: 27
    Last Post: 04-23-2004, 11:22 PM
  5. include question
    By Wanted420 in forum C++ Programming
    Replies: 8
    Last Post: 10-17-2003, 03:49 AM