48,270 reputation
8129214
bio website tech.turbu-rpg.com
location Seattle, WA
age 32
visits member for 4 years, 4 months
seen 9 hours ago
A lifelong programmer who's been coding in Delphi since its initial release and currently makes a living at it.

2d
comment Turn away a bug if no reproducible test case exists?
@Elise: You have the audacity to complain? I'll make you rue the day. Not at all. Most developers (including myself) take pride in their work and want their product to be good-quality. But in order to fix a bug, we need to know the problem, not the symptoms. When you go to the doctor with a complaint of symptoms, the doctor can examine you directly to find out what's wrong. When you come to me with a bug report, I can't do that, so I need to deduce the cause by other means. It really is that simple: if I can't find what's causing the problem, I can't fix it.
Jan
27
comment Is the 'finally' portion of a 'try … catch … finally' construct even necessary?
@Griwes: Yes, exception-safe coding in C++ is exceptionally difficult (no pun intended) because the language is very poorly designed. This is due in large part to C++'s badly broken object model (throw by reference? by object? by pointer? catch by whatever?); it's not nearly that hard in most OO languages.
Jan
27
comment Why use try … finally without a catch clause?
@Baldrickk: I never said there's anything bad about that. How do you get that from what I wrote?
Jan
27
comment Is the 'finally' portion of a 'try … catch … finally' construct even necessary?
@MSalters: Yeah, like I thought. It's clear from your example that you don't understand try/finally. If you "have to call" something that belongs in a destructor, you're not violating DRY, you're violating basic encapsulation. Your argument against try/finally is nonsensical on its face, and it does nothing to disprove my point that C++ giving you RAII but no try/finally construct is a harmful abstraction inversion. Obviously destructor code goes inside destructors; how does that have anything to do with the point I made?
Jan
26
comment Is the 'finally' portion of a 'try … catch … finally' construct even necessary?
@MSalters: What exactly is being "massively duplicated" in finally blocks? That's an assertion with nothing backing it, and if you're writing code that way, it's because you don't know how to use the try/finally construct. And why would finally need to compose in the first place?!?
Jan
26
comment Is the 'finally' portion of a 'try … catch … finally' construct even necessary?
@MSalters: C++ doesn't support finally because it's a poorly designed language. RAII is an abstraction inversion that inserts implicit try/finally constructs for a few specific cases, but does not allow you to insert your own, and it's a very limited substitute for true try/finally behavior.
Jan
20
comment One of my team members committed SQL injection-vulnerable code; should I report it to the manager?
@Sherlock: Yeah, or a sign of someone who made a mistake. When the design of the language is such that the obvious, intuitive way to do something opens a security hole, security holes are going to happen, even for experienced developers. Why do you think we're still getting patches for buffer overflow vulnerabilities every Patch Tuesday, a quarter-century after the Morris Worm put them on everyone's radar? Because some mistakes are literally hard not to make in certain languages.
Jan
19
comment Why does the .NET framework have no concept of classes as first-class types?
@AllenBauer: Heh. Fair enough.
Jan
19
comment Why does the .NET framework have no concept of classes as first-class types?
@Allen: Good to see you on here. I'm not sure I agree, though. It may be regarded as "a compromise" by people on the .NET side without experience with Delphi, but you and I know better. Can you truly say with a straight face that Activator.CreateInstance() is in any way a better solution to the problem solved by virtual constructors?
Jan
16
comment How did people write end-user software in Smalltalk?
JavaScript and Objective-C are both "successful" by riding the coattails of a popular platform. But nobody uses Obj-C outside the Apple ecosystem, and just look how popular other (Simula-style) OO languages that compile down to JavaScript are becoming. (I used the term "marketplace of ideas" for a reason. Monopolies play by different rules.) Ruby was a fad that was popular for a while, but that's fading now that people are learning (again) why message-passing OOP sucks. And Python has no support for "missing method" and no good mechanism to implement it, so is that really Smalltalk-style?
Jan
16
comment How did people write end-user software in Smalltalk?
Again, object-oriented programming is not an idea that came from Smalltalk. The term did, but the concepts came from Simula, which does it a very different way. In the years since Alan Kay coined the phrase, Simula-style OOP has taken over the world, and Smalltalk-style OOP (message passing, etc) has failed every time it was introduced in the marketplace of ideas.
Jan
15
comment If I replace N objects with N pointers, is my space complexity still O(N)?
Unless you're working in C++, all objects are reference types anyway, so the distinctions you're trying to draw doesn't make much sense. (And if you are working in C++, you've got bigger problems to worry about!)
Jan
10
comment How to comply with LGPL 2.1 source-code request?
If it was a formal request that required a formal response, it would most likely be coming from a lawyer. At this stage, it's still safe to try ordinary social interaction. :P
Jan
10
comment How to comply with LGPL 2.1 source-code request?
It's most likely to get you to contribute modifications back, but if you don't know why he's asking, don't ask us the reason why; ask him.
Jan
9
comment Will a profound knowledge of C++ help you in learning other languages faster/easier?
@DocBrown: I didn't say it makes people dumber; I said it would give people ideas that need to be unlearned.
Jan
8
comment Will a profound knowledge of C++ help you in learning other languages faster/easier?
@Deduplicator: I expect copies to not exist because references "should go" everywhere. Liskov substitution demands it, and that's the sine qua non of OOP. You can have inheritance, or value types, but not both on the same type.
Jan
8
comment Will a profound knowledge of C++ help you in learning other languages faster/easier?
@Doval: Yes, that's my whole point: these things are algorithmically undecidable in the general case, which is why they need to be handled by an intelligent person, not an algorithm, to be handled correctly. And saying "that's not a leak, it's an inefficient program" is just semantical hair-splitting; to an outside observer, the behavior of the program is the same as that of a program that is leaking memory, especially in the context of multitasking systems where memory squeezes under load can cause severe problems.
Jan
8
comment Will a profound knowledge of C++ help you in learning other languages faster/easier?
@Doval: Wrong size, place, alignment: how exactly does one do any of these things in an object-oriented language when the proper size is known to the compiler and the allocator handles placement and alignment? Freeing early: this is exactly what GC is supposed to prevent, so saying it's not relevant to this discussion is just straight-up not true. But it does so at the cost of turning every allocation into a memory leak. And not stomping other objects' data is a bounds checking issue, not a garbage collection issue.
Jan
8
comment Will a profound knowledge of C++ help you in learning other languages faster/easier?
@FredLarson: I should have guessed such a prevalent, pernicious problem would have a specific name for it. (And, this being C++, a silly name at that. When a programmer outside the C++ world hears "slicing," he's likely to think of array slicing! :P
Jan
8
comment Will a profound knowledge of C++ help you in learning other languages faster/easier?
@BasileStarynkevitch: Knowing any modern language makes a lot of C++11 new features easier to understand. (Except maybe Java. Does it have closures yet?) :P