127 reputation
19
bio website rmartinho.github.com
location Berlin, Germany
age 26
visits member for 2 years, 8 months
seen May 16 at 19:34
stats profile views 65

I like to (re)invent wheels. I am starting to like Unicode. Despite what others might say, I am not a Unicode expert. I have a personal website.

When I quote the C++ standard, I do it from a relatively up-to-date build of the sources at http://github.com/cplusplus/draft. (last build August 29th, 20121)

Trying to contact me? I usually hang out by the C++ Lounge. If you prefer e-mail, I sometimes check this mailinator mailbox: M8R-gt1qwe@mailinator.com.


1 it will remain a bit out-of-date until I get my build machine set up again; meanwhile, you can get a more recent official draft, N3485.


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 suggested 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#.
Jun
5
comment Why are there so many string classes in the face of std::string?
@user1202136 No, the std::string specification does not make sense when taken out of its context and thrown into another context. That should be obvious, really. Its context starts with the following paragraph: "This Clause describes components for manipulating sequences of any non-array POD (3.9) type. In this Clause such types are called char-like types, and objects of char-like types are called char-like objects or simply characters."
Jun
5
comment Why are there so many string classes in the face of std::string?
It's not like fbstring properly handles Unicode either.
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.
Jan
25
comment Why didn't the C++ Standard adopt expression templates?
@sbi ah, that makes sense.