Formatting of 'this' pointers [closed] - c++

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
To be honest (*this) looks a lot better than this->. They both function the same. Why shouldn't I use the former? Is it just common practice to use this->, or is there something more to it?

Actually both will have same results when accessing data-members. Though you find (*this) more elegant I would undoubtedly say most will disagree.

Related

When should I use the "superproject" pattern? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
Some libraries, such as LLVM, use a "superproject" pattern, where consumers of the library, such as libcxx, should live inside of the libraries' folder-structure. In the case of LLVM, this is llvm/projects.
This seems quite limiting, as it makes it harder use the library when there are other folder-structure constraints.
Why was this descision made, and what are some reasons to use such a layout?

Is there still a place for plain enums? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I have started using strongly typed enums. Looking through my current project there are a few places were I still prefer plain enums.
If the strongly typed characteristic is unneeded and the enum is being used for its implicit conversion to int, are there any other tradeoffs that would make conventional enums a bad choice?

Why is following the standard considered to produce unreadable code or to be impossible? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I was reading this post: https://stackoverflow.com/questions/1025494/obfuscating-c-c-code
The question is:
What tools are available to obfuscate C/C++ code....
An answer which had a bounty awarded to it says:
Follow the Standard insanely.
That'll be enough :)
I don't understand why people say following the standard would produce unreadable code or is impossible. Can someone explain what people mean in that post ? I'm a beginner programmer (in C / C++)

is -Dfoobar the standard for adding definition to the compiler for all C++ compiler? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I am wondering if -Dfoobar the standard way for adding definition to the compiler for all the C++ compiler.
-Dfoobar works for all the compilers that have ever been used to compile Firefox, which is good enough for me. The Microsoft compilers also accept /Dfoobar, of course.

Is relying on short-circuit evaluation good design? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
Are there alternatives that would be more preferred?
Short-circuit evaluation is a crucial feature of most modern programming languages and there's no reason to avoid relying on it. Without it pointer-related tests would be (unnecessarily) much more complicated and less readable.
Of course it's good design, everyone knows to expect it and it beats using nested conditionals.