Smalti

Sunday, July 29, 2012

Yoda Conditions

Yoda-conditions
Using if (constant == variable) instead of if (variable == constant), like if (4 == foo). Because it's like saying "if blue is the sky" or "if tall is the man".
Posted by smalti at 11:34 PM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: C++

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

My Blog List

  • Размышлизмы eao197
    [prog.c++] Дошел до чистого безумия: new(this) another_object_type
    2 days ago
  • Алёна C++
    Тем временем на CppCon 2019
    6 years ago
  • C++ Truths
    Bootstrapping a cmake project based on Hunter in Linux and Windows
    6 years ago
  • Распутывая нити
    Объектно ориентированное юниттестирование
    8 years ago
  • Очень серьезный блог
    Some obvious things about asynchronous network I/O
    11 years ago
  • Raider's Programming Blog
    Boost.Lexical cast
    13 years ago

Blog Archive

  • ►  2015 (1)
    • ►  June (1)
  • ►  2014 (1)
    • ►  November (1)
  • ►  2013 (2)
    • ►  December (1)
    • ►  August (1)
  • ▼  2012 (6)
    • ►  November (2)
    • ▼  July (3)
      • Yoda Conditions
      • IID_PPV_ARGS
      • std::vector of pointers vs vector of elements/values
    • ►  February (1)
  • ►  2011 (8)
    • ►  November (2)
    • ►  May (1)
    • ►  April (1)
    • ►  March (4)
  • ►  2010 (11)
    • ►  November (2)
    • ►  October (2)
    • ►  July (1)
    • ►  May (6)
Awesome Inc. theme. Powered by Blogger.