Joined July 2012
·

Alexander Gessler

Germany
·
·
·

Posted to Simulated type safe enums with C++ over 1 year ago

There is lots of other solutions which are IMHO nicer as they do not require global variables with static storage duration.

For example https://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Type_Safe_Enum

While this may work, it is so terrible for code maintenance that I would never consider it.

Posted to Why assertions are so powerful over 1 year ago

Well, TDD could be seen as a more sophisticated way of expressing your assumptions on your code. I use both and I think they play very well together.

Assertions can express very small assumptions that you cannot reach so easily by tests. To me it is more of a local tool that is great at making code another slight pinch more reliable, wheras TDD is maybe the big paradigm that supersedes the idea.

Achievements
129 Karma
0 Followers
1,700 Total ProTip Views