38,565 reputation
974131
bio website
location Netherlands
age 37
visits member for 4 years, 2 months
seen Feb 10 at 19:58

Jul
1
answered Why do some opensouce libraries lack comments?
Jun
24
reviewed Approve What's wrong with relative imports in Python?
Jun
21
comment When does SOAP make more sense than REST?
@maple_shaft: I disagree; "understandable" / "obscure" is subjective, but "simple" / "complex" is not. It may not be quantifyable, but it is observable, and people usually agree over the relative degree of complexity of any two given exhibits.
Jun
20
comment Break on default case in switch
@svick: all of them, to varying degrees. C set the standard back in the days, and C++, Java, JavaScript and PHP use mostly the same rules. C# is a bit different in that it disallows fall-through, but otherwise, the same applies.
Jun
20
answered Attributing credit for programming languages used
Jun
20
comment How to solve the problem of nested comments
@Vorac: glad you like the reference :D
Jun
20
awarded  Guru
Jun
19
answered What is the reason for using lowercase for the first word in a local variable (eg, employeeCount, firstName)
Jun
18
comment What were the Design Patterns of the procedural programming era?
OOP is actually a bit older: see en.wikipedia.org/wiki/Smalltalk. Also, DRY is not unique to OOP; the principle can be (and should be) in all programming paradigms, although they have different answers as to how to achieve it.
Jun
17
comment Break on default case in switch
@dan04: yes, good point. C# is an exception here, and it's probably because the language designers knew about the problems with switch fall-through in existing languages and wanted to prevent them. The rules C# imposes pretty much match the recommendations from my answer.
Jun
17
awarded  Good Answer
Jun
17
awarded  Nice Answer
Jun
17
answered Break on default case in switch
Jun
14
awarded  Good Answer
Jun
14
comment Best way to check for specific types
@pdr: wouldn't you then be serializing your messages anyway, and parse them back out on the other end? You can easily reintroduce the polymorphism while parsing, and you'll still have what boils down to a switch statement in a factory method, but at least you're not dispatching on an object's run-time type. I'd even argue that if you are passing objects around directly (e.g. using shared memory), it would still be more elegant to give them a property to report what kind of message they are and dispatch based on that.
Jun
14
awarded  Enlightened
Jun
14
awarded  Nice Answer
Jun
14
comment Best way to check for specific types
@pdr: Of course there are cases where this doesn't work, and the cause is usually bad design - either on your own part, or in a library you're using. When that happens, and you can't change the design, use whatever works, but by all means, wrap the ugliness in a sane wrapper and expose only that to other code.
Jun
14
answered Best way to check for specific types
Jun
13
awarded  Good Answer