23,451 reputation
43295
bio website
location
age
visits member for 3 years, 10 months
seen yesterday

Author of C++ tutorials and Wide language.

Foo


Sep
19
answered Storing a pointer to an argument passed by (non-const) reference
Sep
18
answered Given a number X, how do I find from an array of numbers, a unique combination that adds up to X and has the lowest sum of squares?
Sep
7
comment What's the list of how to precisely talk about problems in C++ code within the spec?
Not really. If you wanted to terminate the program for any reason, you could intentionally invoke those conditions if you wanted to. It would be rather odd, but not erroneous.
Sep
7
comment What's the list of how to precisely talk about problems in C++ code within the spec?
The behaviour of an exception is perfectly well-defined, and users can recover from it in perfectly well-defined ways. There is no language rule stating that any given library use of an exception relates to an error. You could throw exceptions to pass arguments if you want (and I have done at times). As for terminating, the C++ Standard requires that all programs terminate, all loops terminate, and all functions return or terminate, except in certain special circumstances.
Sep
7
answered What's the list of how to precisely talk about problems in C++ code within the spec?
Sep
7
comment What's the list of how to precisely talk about problems in C++ code within the spec?
Throwing an exception is not an erroring condition, it is perfectly well defined. Also, not terminating is undefined behaviour.
Aug
18
comment Implementation of instance testing in Java, C++, C#
I downvoted your question because the implementation details vary substantially between languages and even different versions of the same language. The "accepted answer" doesn't even begin to cover two-thirds of the question.
Aug
15
comment Should we only catch in exceptional circumstances?
@BartvanIngenSchenau: Seems perfectly reasonable to me that the user made a mistake and tried to work with a file that he thought he created but got put in the wrong directory or he accidentally deleted or something.
Aug
14
comment Should we only catch in exceptional circumstances?
It's perfectly non-exceptional to imagine that a file might not exist.
Aug
14
revised Should we only catch in exceptional circumstances?
added 158 characters in body
Aug
14
answered Should we only catch in exceptional circumstances?
Aug
12
revised How does std::string in c++ allocate memory?
edited tags
Jul
29
answered Are there technical limitations or language features that prevent my Python script from being as fast as an equivalent C++ program?
Jul
21
comment Eliminating Magic Numbers: When is it time to say “No”?
Well, arguably, the number of seconds in a day changes all the time. Just not very much.
Jul
15
comment Have there been studies on the effectiveness of OOP in managing software complexity?
There's no way to genuinely measure it- it's a quantum effect where measuring it influences the result.
Jul
12
comment How to handle divide by zero in a language that doesn't support exceptions?
My language is targetted at novices... therefore I will make them manually check for error all the time in every function call instead of having the compiler/runtime do it? Interesting logic.
Jun
28
answered Why would a C executable be smaller when compared to C++ executable
Jun
26
awarded  Nice Answer
Jun
23
comment Retrying a statement or call in a catch block - code smell or anti-pattern?
The return values of those methods cannot be trusted, since the filesystem can be mutated by other processes asynchronously. Using them creates a race condition. It's one thing to check them quickly beforehand and another to design your code around the diea that they always produce results you can depend on.
Jun
22
revised Understanding Arithmetic In C
edited tags