Reputation
54,635
Next tag badge:
197/100 score
18/20 answers
Badges
10 154 239
Newest
 Nice Answer
Impact
~1.7m people reached

Mar
27
comment Why did Alan Kay say, “The Internet was so well done, but the web was by amateurs”?
+1. A lot of what Alan Kay says makes him appear to be the sort of person who would not get the old joke about the difference between theory and practice. He's developed a lot of great theories over the years which have failed horribly in practice, and have been thoroughly out-competed in the "marketplace of ideas" by less theoretically pretty systems that actually work well, and Kay's never seemed to truly understand that.
Mar
24
comment Better to write your .NET library with COM limitations in mind, or separate your .NET library from Interop?
Very strange line from the article: "But why would someone ever think of exposing a nice and clean .NET library for a development platform (COM) that was deprecated decades ago?" COM is deprecated? I think someone forgot to tell the folks at Microsoft; they're still adding new features to Windows with it!
Mar
20
comment Is CORBA outdated?
SOAP never was a good idea, even when it was popular.
Mar
16
comment Why use an enum to determine node type in a parse tree?
There are two basic ways. One is to have the node classes themselves contain the necessary logic for the compilation process; the other is to have the base node class declare methods to implement the Visitor Pattern and have visitor classes contain the compilation logic.
Mar
16
comment Why use an enum to determine node type in a parse tree?
Why would you have to do that? The base class doesn't need all those properties; just the ones that are common to all nodes. What needs to know about the capabilities of all the disparate descendant classes is the code that operates on the trees. I've poked around inside a handful of compilers with polymorphic ADTs, implemented in various different styles, and never seen the problem you're describing.
Mar
16
comment Why use an enum to determine node type in a parse tree?
For parse trees especially, it is very uncommon to use polymorphism. It would require the base node type to know about all of the different capabilities/properties/attributes of every different node type in the parse tree. Why? The entire point of a polymorphic base class is that it doesn't have to know what its descendants are up to.
Mar
13
comment component-based power system for a game
OK, now I'm all confuzzled. I thought it was called UnrealScript. Granted, it's been a while since I did any work in that area, but... has that changed?
Mar
13
comment component-based power system for a game
C++? I thought Unreal had its own built-in scripting language.
Mar
12
comment Why JavaScript? What's the advantages?
You basically hit on it already. JavaScript is essentially the Comcast of programming languages: no matter how much it sucks, you really don't have much of a choice but to use it for a specific domain, because it's the only game in town.
Mar
11
comment How would you design a user database with custom fields
A schema is a fixed thing, by definition; you can't set one up if you don't know what the fields that you need are. Have a look at Entity-Attribute-Value for one way problems like this tend to get solved in a relational database.
Mar
11
comment In a program written in Pascal, what hardware components are used?
@MichaelT: Sure, but getting into the often-blurry distinctions between "true" compilers, VM bytecode compilers, and "true" interpreters can get confusing even for experienced developers. I deliberately gave a simple answer here to help get an inexperienced developer started.
Mar
11
comment In a program written in Pascal, what hardware components are used?
@gnat: It's pretty clear to me what he's looking for. As stated, the OP knows very little about computers, and the "missing link" here is that obviously he doesn't understand what a compiler is. That's no reason to pounce all over this question and bury it in downvotes and close votes; why not try to be helpful instead?
Mar
10
comment The dream of declarative programming
@itsbruce: I looked at that paper, got about 1/3 of the way in, and couldn't keep from rolling my eyes when it started talking about creating "executable specifications," which, as Joel pointed out, is the software equivalent of a perpetual motion machine... one of those things that crackpots keep trying to do, no matter how much you tell them it could never work. You got anything non-crazy to recommend on the subject?
Feb
27
comment Constructor-only subclasses: Is this an anti-pattern?
@Doval: Thinking too closely about the ramifications of infinite sets can (literally) drive you crazy. Just ask Georg Cantor!
Feb
27
comment Why are structs and classes separate concepts in C#?
@LightnessRacesinOrbit: Actually that's exactly what I'm doing. I explain that in C#, structs have no inheritance and classes are reference types, and then demonstrate how in C++, which the OP was asking about, not following this pattern causes messes by violating Liskov Substitution and leading to issues like object slicing.
Feb
27
comment Why are structs and classes separate concepts in C#?
@AndyProwl: Perhaps it's a subjective conclusion to draw, but it's one well-supported by objective facts, which I have stated clearly. If you have facts which present support a different position, feel free to present them.
Feb
27
comment Why are structs and classes separate concepts in C#?
@BartekBanachewicz: Pray tell, which of the facts that I stated are subjective? That passing objects as values breaks polymorphism? That objects as value types requires hassles like copy constructors and causes messes like object slicing? That all the hidden gotchas that it introduces is the reason why C# and other OO languages chose not to follow C++'s object model?
Feb
27
comment Why are structs and classes separate concepts in C#?
@Mgetz: That's not object slicing; that's just non-polymorphic functions at work. Slicing is something highly unfortunate that happens when assigning a value-typed object to a derived class, that can lead to bizarre data corruption issues.
Feb
26
comment OCaml criticism: is it still valid?
@Doval: Of course you can detect overflow in hardware. Dealing with it, however, is a software matter.
Feb
25
comment When NOT to apply Dependency Inversion?
What if "your problem" is a hole in the wall? A saw would not remove it; it would make it worse. ;)