« first day (93 days earlier)      last day (4838 days later) » 

12:00 AM
you could argue that I should use return codes in every situation
 
@sbi in general it is. But that's not a gold rule.
 
sbi
@jweyrich No, it isn't, because there are always other ways to do the same thing. (There's languages that do not have exceptions, remember?)
 
There's always a way to avoid them; in theory there isn't anything you can do in C++ you couldn't do in C. The question is whether exceptions would be more maintainable, more effective, etc. than return codes or whatever the alternative is.
 
@sbi I thought we were talking about C++ only.
 
sbi
@jweyrich <shrug/> So make this: C++ used to not to have exceptions, and people could still write any code imaginable.
The essence is the same: There's always a way to do the same without an exception.
So this isn't a criterion to judge whether to use exceptions.
 
12:02 AM
@sbi ok, fair enough - I retract my affirmation.
 
sbi
IMO, it's like this: There's situations where exceptions naturally fit, and there's those where they don't. The trouble is that which those are is open to discussion, preferences, style, and peer pressure.
 
it think it's interesting to consider the situation where exceptions are only used for failure to implement contract when preconditions are satisfied. it seems to me that exceptions would then be reduced to just bad_alloc. or?
 
I'm thinking that probably the main criteria for using exceptions is just whether everyone working on the code understands them well enough (that is, whether to use them in a project at all; there's still the question of where to use them).
 
@AlfPSteinbach no OR for me, please.
 
sbi
I think one widely accepted rule of thumb is: Use exceptions for exceptional circumstances only. As fuzzy as this is, I haven't found one that I consider better. Opening a file often is not an exceptional circumstance, reading from a file failing for hardware reasons often is. Those are the easy examples, though.
@crimson_penguin If you stick to this, we would still be coding in "C with classes".
 
12:07 AM
Is writing to disk and getting disk is full exceptional?
 
sbi
@jweyrich Maybe. If it happens in a routine whose only concern it is to write user document, it likely is. If it happens in a routine that tries to backup a whole partition, it's rather common.
Anyway, I really ought to go to bed now. 'later!
 
@sbi IMO, it shouldn't be in any of these. It's a well-known possibility, therefore it isn't an exception. And so is setting a negative value to a variable that should hold positive values only.
@sbi alright. Have a good rest.
Well, we shouldn't be debating this. As we see, it's quite subjective.
 
isn't that the definition of something you should debate?
nobody is going to debate something that isn't subjective, because there's nothing to debate, the facts are either one way or the other
 
@DeadMG not if you can't reach a consensus.
 
that's a product of the people involved, not the topic being debated
 
12:19 AM
@DeadMG I have to agree :)
@DeadMG You got a new fan. I never thought from this POV.
 
what, that you should throw exceptions liberally? :P
 
@DeadMG HELL NO. It was about "that's a product of the people involved, not the topic being debated".
 
indeed
many people are my fans
that's what makes me awesum
so, assertions
I never really used them before
do I turn them off in release builds?
 
@DeadMG au contraire of @JamesMcNellis, who appropriates someone else's name and make lots of enemies? hehe.
 
lol
 
12:28 AM
@DeadMG yes.
 
what, I made up my own name and I make lots of fans
well
here's to assertions
pretty rare that I come away with a new tool in my belt
gotta love bools- no validation needed there
ok
so what do I do for combinations of variables that are invalid?
like a text that is positioned half way across the screen with a size that's two thirds of the screen
can't validate that in a setter :(
fuck this shit, here CommitChanges()
 
@DeadMG I wouldn't consider it as invalid. I generally protect my library against things that can break something or cause fatal errors. Otherwise the user is pretty much free to do whatever he wants. But it may not be a good idea for all types of libraries.
 
well
should I allow programs to set a text that goes off the edge of the screen?
I think that implies that your program is bugged, buddy
also, I think that a per-setter validation is just wrong
 
nice feature. when user does dumb thing, you spectacularly move some button or menu choice off screen, animated. less and less functionality remains, user sweating now...
 
for example, what if I had a large text object that I was going to move across the screen and then shrink?
 
12:39 AM
@DeadMG I always did. Think about a stamp-text animation, which has a large-zoom and decreases it quickly (though it would use scale/translation, and not text size).
 
assertion error, even though the user was about to shrink the text
imo, an object should be validated in it's entirety, not just one variable at a time, because not all variables make sense or can be validated on their own
 
@DeadMG constructors + possibly replacement of object rather than modifying
 
what about the constructors?
oh yeah
 
they centralize checking of validity
 
could be
 
12:41 AM
from then on, maintain valid in every operation and you have guaranteed valid object
 
but in my opinion
you call a constructor if you need a new object
if you don't need a new object, you shouldn't call the constructor
 
yes, and...?
 
so I should provide for validation in a non-constructor
 
But I still don't think an off screen sprite/text/entity/whatever should be considered invalid. You might want to implement a scrolling marquee for example.
 
a what?
 
12:43 AM
marquee = a scrolling text
 
it's really not the purpose of this particular Text object to handle that kind of thing
 
like on CNN
 
I mean, this is a simple GUI library
I'm not trying to replace WPF or something
what I probably should provide though is a Clamp() method
where you can just move the text to the edge and have it clamped there
 
12:56 AM
@DeadMG My graphic objects were generally dumb. They only hold all needed informations used by the renderer impl. They didn't know about the coordinate system, so I couldn't validate things like you want (off screen). For simple animations I implemented a coordinate generator based on various cyclic functions, so I had something like: coord_evaluator = cyclic<ease_in_out>(/*start=*/0.0, /*end=*/1.0, /*step=*/0.1); text.x = coord_evaluator.update(time); - Just an idea of design, if you like.
 
ah, this way you can process string literals at compile time in c++0x:
tested this on GCC4.6, it works fine
 
wouldn't really describe that as a success
as you had to extract every character manually
 
the macro does it automatically though.
but i agree it's bad that one has an upperlimit that way :(
 
@JohannesSchaublitb Do it the Boost way - write 300-line macros to not worry about upper-limits.
 
1:02 AM
Isn't it what they do?
 
i've no idea what they do :(
 
the boost parameter library has some really really impressive macro support, effectively variadic macros
so could use that
it's undocumented though
 
@JohannesSchaublitb for instance, BOOST_PP_TUPLE_TO_LIST_1, 2, 3.. up to BOOST_PP_TUPLE_TO_LIST_25, and various other macros like this. The preprocessor directory is full of these.
 
1:18 AM
ohhh
 
1:30 AM
I just read that Canada is censoring Dire Straits' "Money for Nothing", because it's mean to homosexuals (nothwithstanding that it's been performed by Elton John). Last week Iran censored Henrik Ibsen's classic play "Hedda Gabler". Welcome to the New World, folks.
oh, sry, twas off topic, except the newspeak in C++
 
1:46 AM
Guys, can't find an answer I liked
It compared lots of programming languages seen from a beginner's standpoint
Hello world in Python/Java/C, etc.
And it had questions beginners might pose ("what is #include", "what is <iostream>")
It's pretty known so I thought you guys might know of it
 
No links
that's the problem :/
Can't find it by googling
Just thought someone would recognize it by my description
 
2:06 AM
hello..
 
 
2 hours later…
4:25 AM
Thinking in terms of Mathematics, we need at least two operands to perform any sort of arithematic operation. If we think in this way, why "dot operator, scope resolution" can't be operator overloadable in ths way... then why "!" is overloadable. Eg: a=!a; is perfectly right, I think. Any valid reasons
Or am I thinking in wrong direction ?
 
 
3 hours later…
@sbi String Literals
 
sbi
@robobooga Yes, L"blah" is a string literal. But what about that L char, that makes it a wide string literal? What's that one called?
 
@sbi I believe it is just a prefix for long strings or wide char
 
sbi
7:21 AM
@robobooga The length of the string doesn't matter.
Anyway, I changed it to "wide string literal prefix". That sounds a bit like Sgt. Pepper's Lonely Heart Club Band to me, so if someone knows anything more concise, please improve on it.
 
7:35 AM
0x has more string literal prefixes, it might have a special name for them; though "string literal prefix" doesn't seem bad
 
sbi
DAMMIT, WHO UNPINNED THE TWO NEWBIE HINTS? I considered them important.
And this fucking chat doesn't let me pin them again!
Whoever you were, I suppose you will now explain things to newbies one by one.
I can't even find the one from Robert anymore...
 
the other got unpinned too
 
sbi
@FredNurk Note that I wrote "...the two...".
 
When creating some functionality, and wrapping it in a namespace, some of the classes are not really meant to be exposed from that namespace. Is it common practice to create a private implementation namespace, and what is the practice for naming it?
 
sbi
7:48 AM
@FredNurk I just found Robert's:
Nov 12 '10 at 20:11, by Roger Pate
Don't be vague, be an ace; write a proper test-case! Paste at http://codepad.org/, http://ideone.com/, or here (if short).
But I can't pin that one, either.
 
don't ask me how the chat admin interface works, sorry
 
sbi
Dammit, this had 14 stars, and well-deserved, still it's too old to show up on the right.
 
too old? maybe that's why they got unpinned: age?
would be weird, but shrug
 
sbi
@FredNurk Aren't you an owner? You're certainly around here long enough to be one, but right now I feel like that "many owners" idea isn't all that well.
 
no one has given me any kind of special access, that I know of
 
sbi
7:50 AM
@FredNurk The more stars a message has, the longer it shows on the right. (Pinned messages keep there.)
 
(nor would I see much point in my having it, thankfully this place doesn't (yet?) need moderation)
 
sbi
Pinning a quote doesn't do the right thing. And now it won't even let me unstar that thing, because supposedly I starred it myself (which I can't for my own messages). <sigh/>
 
I did notice elsewhere that pinning seems to count as a star
anyway, I just got back from the bar and I'm ready for some shuteye before the hangover tomorrow; later
 
sbi
Sleep well. I need to go to work now.
 
8:32 AM
7
Q: What does : :: mean in C++?

acidzombie24I thought i knew everything but something always seems to pop up. Maybe i am forgetting something. What does the : ::name mean? I suspect ::google means from the global namespace use google, protobuf, message. But what does the : do before it? Theres no text on the left so it cant be a label (or ...

Another strange colon question :) Please vote to close.
 
 
2 hours later…
10:36 AM
@FredOverflow lol remembers me of the --> one
 
sbi
@FredO, @Johannes, could you please try to un-star that message starting with "chat.stackoverflow.com/transcript". It was an attempt to get one of the pinned messages back. I pinned it, and unpinned it, but now I'm not allowed to remove the star, because I cannot star my own messages.
 
@sbi if i click on the star it makes me star it instead of unstaring it
why did someone unpin the two newbie hints?
i think everything is logged. we just need to ask jeff to tell us who it was xD
@sbi why can't you pin a message out of a log?
 
@JohannesSchaublitb while (x --> 0) is one of my favorite loops! :)
@sbi I cannot unstar it because I never starred it.
Does it help if I star now and then immediately unstar?
 
sbi
10:51 AM
@FredOverflow Maybe if you star it, an owner can remove all stars after your star is fixed?
@JohannesSchaublitb Don't ask me.
 
@sbi I don't get. Should I star now or not, just tell me.
 
sbi
@FredOverflow Star it and let that choice settle. Then let's see if an owner (probably not me, but who knows?) can remove all stars, including the one that's left over from pinning.
 
11:06 AM
@JohannesSchaublitb You also cannot star a message out of a log :(
 
11:22 AM
lol @FredOverflow this star-appeal is confusing!
@sbi have you done a bug report about "cannot star message out of the log"?
 
11:44 AM
@sbi seems to work
weird
 
sbi
12:01 PM
@JohannesSchaublitb Wow, great! Can you pin the other one, too?
@JohannesSchaublitb Maybe I am not allowed to, because I already had pinned them? All it offered me was to unpin it.
@sbi Well, if you think it's worth it, anyway. (It's at chat.stackoverflow.com/transcript/10?m=106675#106675.)
 
@sbi i tried pinning it. the original text showed for a couple of seconds, and then it changed to the URL form
no idea what's going on
 
sbi
@JohannesSchaublitb ???
 
@sbi please watch the channel pin list for changes while i'm now trying to pin and unpin it.
 
sbi
Please stand back, while I play with pins...
 
hm i can't unpin it xD
 
sbi
12:06 PM
You haven't even pinned it. I suppose that's because you already pinned/unpinned it.
 
but I'm sure it did show the original text for a very short period of time, before changing to chat.stackoverflow.com/transcript/10?m=106675#106675
but now even if i click "unpin", it still says "you have pinned and starred it"
 
sbi
@JohannesSchaublitb Yeah, that's what I suspected.
This chat thing has many surprising limitations built in, supposedly in order to keep us from playing with it too bad. Well, maybe some other owner can try this later.
 
sbi
Oh, I just saw that @FredO is an owner. Fred? You here?
 
ah now i understand
 
sbi
12:09 PM
???
I'm all ear. :)
 
@sbi i think it's unpinned now
 
sbi
???
 
that URL thing wasn't the actual message. it was the message of yours that contained the quoted message
i always tried to unpin the actual message. that's why it didn't work
 
sbi
@JohannesSchaublitb Yep, that was my try.
Can you pin the actual one?
(And can you unstar that quoted one?)
 
sbi
12:14 PM
Ah, I see. The latter worked.
 
i just clicked "Cancel stars". seems to remove all stars then
 
sbi
I suppose the system kept your from pinning Robert's message, though, because you had already played with it for a while? So that you wouldn't do anything pervert to that innocent message, right?
 
i've no idea
i've never pinned any of those newbies stuff so i'm not sure what's happening lol
 
sbi
@JohannesSchaublitb But you've been playing with it for a while now, trying to unpin it.
 
oh i see. indeed
maybe it queues up unpinnings and hasn't processed them yet?
 
sbi
12:17 PM
You see what? A bright light? :)
 
sbi
@JohannesSchaublitb No, it does that immediately. The lag I'm seeing when doing this must be the round-trip to the server and back.
 
sbi
You keep saying this.
 
why did it work with the other newbie hint
i'm always saying it when I receive an important insight
 
sbi
12:22 PM
@JohannesSchaublitb I dunno. But I see that Robert's message has now lost all its stars. I suppose one of us did something wrong with it. :(
@JohannesSchaublitb Is the number of repetitions of h in your "ohh" directly proportional to the level of importance of your insight? :)
 
@sbi how can one see how many stars it has?
@sbi usually.
 
sbi
@JohannesSchaublitb Follow the link. It has none. It used to have 14, at least it had 12hrs ago.
 
oh i see now. they are displayed next to it!
 
sbi
Anyway, I do need to get some work done. Otherwise I haven't earned the right to beat up the kids tonight. Maybe some other owner can fix that later.
 
@Jo Was your class : question a fabricated question to go in the FAQ?
 
12:28 PM
@Konrad not to go into the FAQ but to go into the "c++ hidden features". but as that Q is closed, I needed to make this workaround
 
sbi
@KonradRudolph (@attributions need at least the chars)
 
@sb That stinks
(never noticed, btw. odd)
 
@RogerPate this is a nerdy test.
 
And writing @ Joh sounds weird ;)
 
12:36 PM
@KonradRudolph see
Jan 7 at 21:05, by Johannes Schaub - litb
i just found you can declare class : base { };
 
sbi
45
Q: How do comment @replies work?

How do I respond to a specific user when entering my comment? Will they be notified? Related: How do I view my recent replies? Return to the FAQ index

 
@sbi This doesn’t explicitly apply to chat, though
 
1:06 PM
Thinking in terms of Mathematics, we need at least two operands to perform any sort of arithematic operation. If we think in this way, why "dot operator, scope resolution" can't be operator overloadable, it is valid... then why "!" is overloadable. Eg: a=!a; is perfectly right, I think. Any valid reasons. Or am I thinking in wrong direction !!
 
sbi
@KonradRudolph It does, implicitly. And the chat FAQ explicitly states it.
 
alright
 
sbi
@Mahesh This was an explicit decision made by Stroustrup back then. You can read about his reasons, philosophy, and much more in The Design and Evolution of C++.
 
@sbi - Thanks for the info and the link.
@ALL - To a C/C++ interview, what are the most important things to concentrate at? Infact everything would be important, but some thing at the interview point of view
 
1:19 PM
@sbi - Thanks, following them for the past one month.
@sbi - Inheritance, Virtual Functions, Overloading, templates,
 
sbi
@Mahesh There ought to be one asking your general question. Have you looked for this?
 
@sbi - I didn't check that. Will do a search now.
@sbi - I don't why I didn't search on SO. All these days I was on Google for it ;). Got so many interesting links on SO. Thanks
 
sbi
1:39 PM
Oops. I meant to post a link to the question, not my answer. (I'm not that desperate for rep on pse.)
0
Q: How do you deal with moral and ethics in your project?

Amir RezaeiSome projects are in a boundary where questions regarding moral and ethics become actual. For example when you are developing a online gambling game. Where do you draw your line regarding moral and ethics in your project? Please comment if question needs to be clarified.

 
2:17 PM
haha!
-1
Q: Appropriate punishment for people who use "like" wrong

CarlosThe other day I overheard someone sprinkling their every sentence with the word "like": "I'm like, totally, you know, the same kind of like person as Tom Cruise. I'm sure like we'd get along like total buddies. I mean I know I'm like an investment banker and he's like a movie star, but you know,...

love the question. Deserves a million upvotes
 
sbi
@KonradRudolph You mean that deserves like a million upvotes! :)
 
sbi
2:41 PM
(And, yes, this is a shameless plug. Well, I do feel a little shame...)
 
2:54 PM
heh sbi
I think that you don't see the advantages of extension methods
 
sbi
@DeadMG I use them. Daily. I write extension methods. Weekly. So I know a bit about them.
 
what, in C++?
I'm impressed
 
sbi
@DeadMG You only see what questions I answer. Have a look at the questions I asked.
I earn my money writing C#.
Anyway, with that I've hit a classic honeypot question that attracts voters like flies.:)
 
lol
indeed, I checked your questions and the truth you did tell
however, I still believe that there are some C++ specific problems that could be solved with extension methods
like ADL
 
sbi
@DeadMG On something totally unrelated: Someone unpinned the two newbie questions. Johannes managed to pin mine, but Robert's he failed, since the system is so closely guarded in order to prevent us from doing mischief, it's hard to get anything done off the beaten path. Can you try whether you can pin this one: chat.stackoverflow.com/transcript/10?m=106675#106675
You're an owner, too, and you should be able to do that.
 
3:00 PM
yeah
done
 
sbi
@DeadMG Great! Thanks!
 
no prob
well
this is officially the first time I ever wrote an assertion in a setter
 
4:01 PM
@sbi nice it's up again. how did you do it?
ohh i see now! nice @DeadMG
 
I have another one for us german people. What do you say when your project is near the deadline?
> Now becomes it but slowly highest iron train!
 
any openglfag in here ?:p
got a fast question
 
Is the question "Why does NeHe suck?"?
 
lol no ;p
about shaders
NEHE ROCKS lol
 
sorry man, I'm a Direct3D user
 
4:20 PM
hmmm
 
4:54 PM
man
I think it's a bad sign when your program's performance randomly halves and doubles
 
 
4 hours later…
8:55 PM
typename std::iterator_traits<RandomAccessIterator>::value_type x = *it;
auto y = *it;
I just love the simple improvements C++0x brings to the table!
 
I prefer decltype(expr) val = expr; personally
auto doesn't behave how I'd expect with regards to returning references and such
 
@DeadMG Hm, so would decltype(*it) z = *it make z a reference to the element in the container? I want a copy.
 
yes
but I would expect a reference, if the type of *it is a reference
that is, if you do
auto y = *it, then I expect for y to have the type of *it, which is a reference if *it is a reference
but auto doesn't behave that way
it strips cv and reference qualifiers- that is, creates a value copy
 
@DeadMG I somehow "intuitively" know that, but I don't know the design rationale behind that.
 
I expect it's for safety
if it returned a ref, I could then go invalidate it
like
 
9:01 PM
I seem to remember reading a paper on auto and decltype, must find that again...
 
auto result = std::string("hai")[1];
which is of course now valid, because result isn't a reference
 
Is std::string("hai")[1] an lvalue or an rvalue?
 
probably an lvalue
although my instinct would say that it should be an rvalue
 
char&& test = std::string("hai")[1];
> error: invalid initialization of reference of type 'char&&' from expression of type 'char'
@DeadMG Yepp, seems to be an lvalue. Makes sense, std::string("hai") is not const, so the non-const version of operator[] is invoked which returns a char&.
 
ewwwww const
 
9:06 PM
I like const :)
2
 
I believe we may have already established this
 
And I haven't changed my mind since.
 
sbi
9:37 PM
27
A: What's wrong with const?

sbiThe only thing wrong with const is that it is seriously underrated by to many developers. It's one of the best tools in C++'s toolbox, very sharp, and yet not dangerous to cut yourself with.

:)
 
I already saw that answer
it's only accurate if you don't define "dangerous" as "huge waste of time"
 
sbi
9:58 PM
@DeadMG I once joined some project in a company I used to work for. I was to add some code, and when I tried to add this const-correct, I saw that the programmers in the project had widely disregarded const, making my correct code fail.
I was a very inexperienced developer then, so I set out to fix the code that caused my code to fail by adding a const where it should have been. Then my code compiled, but the code I changed didn't compile anymore, because it used other code, which wasn't const-correct either. So I changed that, too. Now the code my code referred to compiled, but the code it referred to didn't, because it referred to code that disregarded const, too. So I changed that, too...
In the end, I spent three days sweeping through the code, adding const left and right, with rapidly increasing desperation and decrea
3
Anyway, I need to go to bed now, so you will have to continue this dispute without me. Enjoy!
 
have fun
 
@sbi Shame we can't upvote comments in chat, I'd do that for this one.
 
10:45 PM
two dogs have fun
lol
hey guys, trick question!
 
what's wrong with string const x = ""; assert(x[0] == '\0');
 
silly question
nothing wrong, if you're testing your implementaiton
he he
 
maybe ishould start a new "forum-question" and ask "I was in an interview and I was asked ..." haha
how many answers would bubble up "out of range access"?
 
if you assume std::string, then the more serious thing is the assumption of null-termination in the buffer. in practice it will be so, because it's inefficient to not have it (not prepare for c_str call). most implementations, except Visual C++, don't check
but i think string is defined like typedef char const* string.
isn't it?
 
10:53 PM
Why do C++ programmers aspire to have two buttocks? Because they need the double colon so often.
 
on the other hand, i've yet to see c++ programmer aspire to have semi-buttocks
 
@JohannesSchaublitb Is that a serious question? It is illegal to index beyond the bounds of a std::string. Also, a std::string isn't guaranteed to be zero-terminated.
@AlfPSteinbach What? No, string is a class. How would you call methods on it if it was a simple typedef for const char*?
 
@FredOverflow why would it be beyond the bounds?
 
@FredOverflow huh, i see nothing that's necessarily a method call
 
surely you wouldn't have succeeded the interview
@AlfPSteinbach oh im sorry it was supposed to be a std::string
 
11:10 PM
@JohannesSchaublitb Assuming std::string it would be be beyond bounds because it would be a zero-length string, with no valid index 0. however, as I wrote, Visual C++ is about the only implementation that provides [] index checking by default. If it does.
 
@AlfPSteinbach wouldn't beyond bounds
 
@JohannesSchaublitb There is no valid index in an empty string, so it is illegal to use operator[].
 
@Johannes: oh yes.
 
it's not illegal
damn i should have made a question out of this
 
@JohannesSchaublitb it's formally UB.
 
11:15 PM
it's not formally UB
 
@Johannes: wait. i'm limited by slow machine. just a few secs, please.
 
std::string x;
char c = x.at(0);
This throws std::out_of_range. So I'm pretty sure the index 0 is invalid.
 
@Johannes: you're right, i was wrong. there's special exceptional case for pos == size(). who'd know?
 
@AlfPSteinbach stdquot please
 
@FredOverlow: means you also wrong, sorry.
 
11:18 PM
@AlfPSteinbach Then file a bug to Microsoft.
 
§21.3.4/1 "Otherwise, if pos == size(), the const version returns charT(). Otherwise, the behavior is undefined." And in Johannes case it's the const version that's invoked.
 
Oh wait, if I use operator[] instead of at, it doesn't throw:
std::string x;
char c = x[0];
 
he he, at is the one that guarantees to throw :-)
 
I almost always prefer at to operator[] because I prefer slow correct programs to fast incorrect programs. Yes I know, not very C++ish :)
 
Anyway, I'd goof at that question at interview. I don't remember such exceptional cases. If they asked, it would be because they wanted a language lawyer, I'd guess.
 
11:25 PM
in c++0x it's also for non-const that 0 is a valid index for empty string
 
is the "one past end is OK except for modification" generally there also for other containers?
 
not at all
vector<string> x; wouldn't create a single string, and x[0] would be UB indeed
 
@Johannes: Why does std::string have this special rule?
 
11:46 PM
@FredOverflow I would guess in order to support simple translation of char* based functions to use std::string
I hate this system where I use time on creating example program, SO informs me that another answer has been posted, I hit "Send" immediately, and there it is, some other answer with almost identical code and already 4 upvotes amassed in the single half-second. Argh.
 
@FredOverflow you can try opening a question and asking that
 

« first day (93 days earlier)      last day (4838 days later) »