854 links
  • Links Lounge
  • Home
  • Login
  • RSS Feed
  • Tag cloud
  • Picture wall
  • Daily
Links per page: 20 50 100
page 1 / 1
1 results tagged GotW x
  • GotW #90 Solution: Factories | Sutter’s Mill

    Ahahah !

    Aside: Someone might say, “but can’t someone still write load_widget(some_id).release()?” Of course they can, if they’re pathological; the correct answer is, “don’t do that.” Remember, our concern is to protect against Murphy, not Machiavelli—against bugs and mistakes, not deliberate crimes—and such pathological abuses fall into the latter category.

    A part ça, "modern C++" est vraiment puissant ! Je reconnais que pour l'instant j'utilise plutôt Qt et je reste très très loin des "smart pointers". De voir qu'il est possible d'utiliser quelque chose du type "optional" en retour de fonction pour signifier "ma fonction renverra un MyType ou rien s'il n'est pas disponible", c'est quand même génial ! Et ça évite d'utiliser un pointeur là où il n'y a pas de besoins...

    Thu 06 Jun 2013 09:03:23 AM CEST - permalink -
    - - - http://herbsutter.com/2013/05/30/gotw-90-solution-factories/
    C++ GotW
Links per page: 20 50 100
page 1 / 1
Shaarli - The personal, minimalist, super-fast, no-database delicious clone by the Shaarli community - Help/documentation