Reputation
27,222
Next tag badge:
98/100 score
20/20 answers
Badges
5 43 109
Newest
 Nice Answer
Impact
~1.1m people reached

10h
answered How to simplify structure of a monitoring software that uses the Observer pattern?
Sep
2
awarded  Nice Answer
Aug
22
comment Good practice for holding immutable data
The only thing that help says about discussion is a) don't do it and b) do it in chat. It says nothing about posting discussions as answers.
Aug
22
comment Good practice for holding immutable data
Design pattern? It's a trivially obvious use of a trivial structure.
Aug
22
comment Good practice for holding immutable data
I'm not sure how to improve this answer other than deleting it outright, as it appears to be a discussion.
Aug
22
revised Good practice for holding immutable data
added 682 characters in body
Aug
22
comment Good practice for holding immutable data
Did you use a memory profiler to prove that the Foo objects are the source?
Aug
22
answered Good practice for holding immutable data
Aug
22
comment Good practice for holding immutable data
That's true, it's just that the number of cases is about 2 in total, all of which are handled for you at the OS level. However, the fact that his is completely immutable IMO prevents most of the disadvantages of statics/singletons, and is really a separate matter from normal singletons.
Aug
18
comment Mutable AST vs. different immutable ASTs
@delnan: The argument between "semantic tree" and "syntax tree" is literally this entire question.
Aug
18
comment Mutable AST vs. different immutable ASTs
@SK-logic: Depends on exactly how intermediate they are. My compiler has several intermediate trees that don't have any syntax.
Aug
18
comment Mutable AST vs. different immutable ASTs
This simply raises the further question as to why the fuck any later passes care in the slightest about the syntax of the matter. For basically every program there are innumerable ways of syntactically specifying identical semantics. Furthermore, any such tree would not be a syntax tree, it would be a semantic tree with a pointer back to the original syntax tree.
Aug
18
answered Mutable AST vs. different immutable ASTs
Aug
18
comment Mutable AST vs. different immutable ASTs
It's an abstract syntax tree. Why in hell would you output a syntax tree from a semantic pass?
Aug
16
comment Complex iterators in C
Looks to me like you're begging to upgrade to C++...
Aug
14
comment How to initialize an array of const char * strings and initialize each one of the strings contained within?
You need to be consistently crashing the program with double deletes? Interesting tradeoff.
Aug
7
answered Can a pimpl variation be implemented without any performance penalty?
Aug
3
awarded  Enlightened
Jul
28
awarded  Popular Question
Jun
29
awarded  Good Answer