231 reputation
25
bio website
location
age
visits member for 3 years, 1 month
seen Jul 28 '13 at 7:49

I write POSIX C. Mostly to make other developers' lives easier, sometimes to make stuff go faster or use less memory.

In my spare time, I like to try new stuff, and dabble in many things.


Jul
31
awarded  Yearling
May
7
comment When to use typedef?
typedef Input_iterator std::vector<int>::const_iterator; is backwards
Apr
10
comment Why do we need to put private members in headers?
Pimpl could easily be integrated into the core language by just adding some syntactic sugar. That'd be backward compatible.
Feb
8
comment Exceptions as asserts or as errors?
This would make more sense if code without exceptions actually look like that, but it usually doesn't. This pattern appears when error_handler never returns, but seldom otherwise.
Feb
8
comment Exceptions as asserts or as errors?
Perhaps, but so far there hasn't been anyone explaining why they're better (except compared to error codes). I don't like the concept of using exceptions for things that are not exceptional, but it's more instinctual than based on facts.
Feb
8
comment Exceptions as asserts or as errors?
I agree with you, but it's the reason most seem not to that made me ask the question.
Feb
8
comment Exceptions as asserts or as errors?
In a way I guess I am looking for justification for using exceptions. Since I have some idea of how they're implemented, I do know just how expensive they can be. But I guess if I can get a good enough argument for their use I'll go that way.
Feb
8
comment Exceptions as asserts or as errors?
Thanks, but I'm not considering returning NULL. Doesn't seem possible in the face of constructors anyway. Like I mentioned I'd probably have to use an error flag in the object.
Feb
8
revised Exceptions as asserts or as errors?
Added explanation of nil.
Feb
7
comment Exceptions as asserts or as errors?
The alternative isn't necessarily a simple int. I'd be more likely to use something akin to NSError which I'm used to from Obj-C.
Feb
7
awarded  Student
Feb
7
answered How do you assign error codes?
Feb
7
asked Exceptions as asserts or as errors?
Feb
4
comment What's RAII? Examples?
I know this is an old answer, but I'm still somewhat confused. I just learned of the term and some info says that acquisition should happen in the constructor. That doesn't really make sense to me and this answer seems to contradict it, but could you clarify?
Nov
11
awarded  Commentator
Nov
4
awarded  Editor
Nov
4
revised Local Stack vs Call Stack
Added array version
Nov
4
comment Local Stack vs Call Stack
Well, it isn't necessarily, but it might be. If there's a stack frame that needs to be setup, and registers saved on the stack, then it most likely is.
Nov
4
answered Local Stack vs Call Stack
Nov
4
comment How does Ruby, Python, PHP manage without Spring?
You'll probably get better answers if you at least briefly explain what Spring does.