Reputation
Top tag
Next privilege 200 Rep.
See reduced ads
Badges
1 9
Newest
 Organizer
Impact
~252 people reached

Dec
22
revised How could I avoid singletons in this case?
added 149 characters in body
Dec
22
answered How could I avoid singletons in this case?
Mar
27
comment Why is it bad to write something in language X as if you're writing a program in language Y in terms of using a shared coding paradigm
FWIW RAII was not new in 2002. RAII is one of the two features that sets C++ apart from other languages and skipping it when teaching was already negligent in 2002. It's not C++ from a decade ago. It's C++ from people whose knowledge was already hopelessly outdated a decade ago.
May
15
comment Why is 0 false?
"It is a mathematical fact that 0 is false and 1 is true" Erm.
May
15
awarded  Organizer
May
15
revised Why is 0 false?
Better tags, I think.
May
15
suggested approved edit on Why is 0 false?
Mar
21
comment Are generic programming and OOP mutually exclusive?
@StefanoBorini Code speaks louder than words.
Mar
21
comment Are generic programming and OOP mutually exclusive?
@StefanoBorini that article is about how the two can coexist and even work together to be more than the sum of their parts.
Dec
20
comment Does auto make C++ code harder to understand?
Also note that having a properly named x would make knowing the type here even less interesting. At the end of the day, I think that responsible use of auto leads to much better names and thus more readable code.
Dec
20
comment Does auto make C++ code harder to understand?
Ok, it's somewhat better now. I still find the variable is poorly named, though, which still hurts. Were you to write auto record = myObj.FindRecord(something) it would be clear that the variable type was record. Or naming it it or similar would make it clear it returns an iterator. Note that, even if you did not use auto, properly naming the variable would mean you don't need to jump back to the declaration to look at the type from anywhere in the function. I removed my downvote because the example isn't a complete strawman now, but I still don't buy the argument here.
Dec
20
comment Does auto make C++ code harder to understand?
This is a clear example of bad naming hurting readability, not really auto. No one has the faintest idea what "DoSomethingWeird" does, so using auto or not won't make it any more readable. You will have to check the docs either way.
Dec
20
comment Does auto make C++ code harder to understand?
Exactly. Who the heck cares about the type. It's an iterator. I don't care about the type, all I need to know is that I can use it to iterate.
Dec
20
comment Does auto make C++ code harder to understand?
Do you really need to check the return type every time? Why isn't the type clear from the code? auto can often makes things harder to read when they are already hard to read, i.e., functions too long, variables poorly named, etc. On short functions with decently named variables, knowing the types should be one of #1 easy or #2 irrelevant.
Dec
4
comment for vs. foreach vs. LINQ
That's why the loop goes into the implementation, and then you use Intersect everywhere.
Oct
5
comment What functionality does dynamic typing allow?
Just a note: Mono's csharp is a REPL (not "a kind of", a real one) for C#.
May
30
comment Single Responsibility Principle - How Can I Avoid Code Fragmentation?
I know what the flamethrower is for, but how the heck do you fish with a pole?
Apr
1
comment Is there a language between C and C++?
@MasonWheeler strings (i.e. char arrays) are not a value type in C. You can't pass arrays by value in C (well, not without adding a struct wrapper and setting a maximum size).
Feb
28
comment Is it possible to combine programming languages?
This might be relevant: chrisseaton.com/katahdin
Feb
6
comment Is C++11 Uniform Initialization a replacement for the old style syntax?
+1 Nailed it. I'm deleting my answer since yours addresses all the same points in much more detail.