36,306 reputation
769126
bio website
location Netherlands
age 36
visits member for 3 years, 7 months
seen Nov 24 '13 at 20:13

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
Jun
13
reviewed Approve suggested edit on Why is Python written in C and not in C++?
Jun
13
reviewed Reject suggested edit on What is the difference between requirements and specifications?
Jun
13
awarded  Nice Answer
Jun
13
answered How to solve the problem of nested comments
Jun
11
comment Looking for a popular, well known example of closed-source software which uses LGPL code, and says so
"Commercial" and "closed-source" are not the same thing. Ubuntu is commercial, but most of it is open-source; MySQL is highly commercial, but open-source. And vv., there is enough non-commercial software with a non-free license or even binary-only distribution.
Jun
11
comment OOP concept: is it possible to update the class of an instantiated object?
@coredump: you have an idea; the computer does not, however, and more often than not, the idea is wrong in subtle ways.
Jun
11
comment OOP concept: is it possible to update the class of an instantiated object?
@coredump: What I mean is that when an object can be monkey-patched, knowing what its class is doesn't give you any guarantees about the object itself, other than the constructor that was used to set up the object's initial state. In something like Java, knowing an object's class tells you which fields and methods it has, and which interfaces it implements. You can't do that in Python.
Jun
11
comment OOP concept: is it possible to update the class of an instantiated object?
Well, Python's classes are very loose anyway; you can monkey-patch methods and fields into existing objects, too, so the class doesn't really mean a lot. Changing the class is an intended feature in the sense that the intention is that you can change anything you bloody damn choose to.
Jun
11
answered How do I (php developer) work with an asp.net developer?
Jun
11
answered OOP concept: is it possible to update the class of an instantiated object?
Jun
11
answered Sync SQLite using only HTTP