74 karma · joined Jan 18, 2009 (17y ago) · 24 submissions
comment 1y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
Or you can ask in the reverse: when would you stop wanting to invest in delivery beyond maintenance? What does "good enough" look like?
comment 2y ago · link · parent
comment 3y ago · link · parent
comment 4y ago · link · parent
What evidence suggests that this was unintentional? It offers a sense of fairness and objectivity from the originator, without generalizing the concept of a transactionless block or requiring any special logic to enforce it.
comment 5y ago · link · parent
comment 14y ago · link · parent
But just to clarify: no base class implementation is aware of derived classes in the copying case, so your smell doesn't exist. See Scott Meyers' "virtual copy constructor" snippet half way down the page: http://books.google.com/books?id=azvE8V0c-mYC&lpg=PT159&...
You can't do it that neatly without covariant return types. Ergo, you can't do that while returning safe, smart pointers.
comment 14y ago · link · parent
I have a polymorphic type that should be copyable. Because of the limitations of C++ copy constructors and operators, my only option is to expose a virtual method (call it "copy"). The non-smelly semantics we want are such that if you call "copy" on an object, you get an identical copy of the same type. So if you call "copy" on a pointer of type A, you get an A. Call it on a B, you get a B.
The contract itself is polymorphic. It doesn't commit to returning any particular flavor of A.
We can implement this method if we return naked pointers. But if we want to be safe and return a smart pointer, we have to introduce dynamic casting or other worse smells.
comment 14y ago · link · parent
Covariant return types are a powerful feature in a language that doesn't support other forms of return type polymorphism. shared_ptrs function so similarly to pointers that it can be surprising when they don't support this behavior. Surprise and capability mismatch with pointers are strikes against shared_ptr. But not sufficient ones to stop me from using them.
21.
Coke accidentally created an ad for our app. What should we do?
18 points · by MatthewCampbell · 15y ago · 12 comments
comment 15y ago · link · parent
comment 16y ago · link · parent
http://www.amazon.com/Fiddler-Subway-World-Class-Violinist-P...
Great Zucchini is my favorite, too. And his favorite.
comment 16y ago · link · parent
This is the same mistake they made when Cheney said "Fuck yourself." They danced around the word, calling it, "An obscene phrase to describe what he thought Mr. Leahy should do." Readers can only clearly judge the offensiveness of the phrases by seeing them written.
The Washington Post decided to print the word in the Cheney case. I bet they'd seriously consider printing the song title, if they don't decide that pop culture and radio freedom are less newsworthy than vice presidential asides.