8,751 reputation
22255
bio website stackoverflow.com/users/14065
location Moz.com
age
visits member for 3 years, 11 months
seen Dec 22 at 9:25

Oct
22
awarded  Nice Answer
Oct
14
revised How to setup the c++ rule of three in a virtual base class
added 21 characters in body
Sep
30
awarded  Explainer
Aug
4
awarded  Nice Answer
Jul
15
comment Is it a good idea to “#define me (*this)”?
@Mehrdad: But only putting yes or no makes a very boring answer. Thus explanations are usually quite useful in explaining how the answer is reached (is encoraged by How to answer ). The conclusion is not to use because the OP has the wrong attitude to start with about using this and thus a discussion on that point is required to achieve a fully balanced conclusion.
Jul
14
comment Is it a good idea to “#define me (*this)”?
@Mehrdad: Because the OP explicitly says he is using me. instead of this->. Since there is no need for this-> there is no need for me. and thus no need for the macro.
Jun
17
awarded  Announcer
Jun
10
comment Is there a Design Pattern for preventing dangling references?
@iFreilicht: If you want to be able to destroy the object and detect destruction just before usage then use std::weak_ptr. This is just the other side of std::shared_ptr.
Jun
10
comment Use a template to get alternate behaviour?
Why not just two functions: sId() and sIdTrue()
Apr
7
comment Ensure that each class has only one responsibility, why?
Can't all the reasons for single responsibility be correct? It does make maintenance easier. It does make testing easier. It does make the class more robust (in general).
Mar
15
comment A module which is used by most other modules
Singeltons should not be used in isolation. You need to combine the singelton with a creation pattern (pick any Factory is common) so that you are not tied to the same code for production/testing or other situations.
Mar
6
awarded  Nice Answer
Jan
19
reviewed Reject Is the C programming language still used?
Jan
11
awarded  Yearling
Jan
8
comment How should I mark types in C and C++ programs?
Also my favorite technique. Types have an initial uppercase letter. All other identifers are not types and thus easily seen.
Jan
8
comment How should I mark types in C and C++ programs?
See this question for reserved identifiers (including _t) stackoverflow.com/a/228797/14065
Jan
2
awarded  Good Answer
Dec
16
reviewed Close How to compare features of two curves?
Dec
16
reviewed Close What was the need of introducing Python 3 when we already had Python 2
Dec
16
reviewed Leave Open Does switching from one programming language to another cause a loss in experience?