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

May
4
awarded  Nice Answer
May
4
comment Why does C provide language 'bindings' where C++ falls short?
@DocBrown: Sure looks to me like the question is about C language bindings vs. C++ language bindings.
May
4
answered Why does C provide language 'bindings' where C++ falls short?
May
1
comment How would I prevent assemblies that have been digitally signed from being called by unsigned assemblies?
@RobertHarvey: That does seem entirely unreasonable to me. If you don't want anything but your program to use this code, why put it in an external DLL? As I said, that's the entire point of making an external DLL.
May
1
comment How would I prevent assemblies that have been digitally signed from being called by unsigned assemblies?
Why would you want this? Digital signing means "I can prove who the author of this assembly is." I can see why you would want to say "my signed code can't call into an unsigned, and therefore untrusted, assembly," but I don't see any legitimate reason to say "nobody who I'm not already familiar with can use my code." That goes against the whole point of putting your code in an assembly in the first place--making it accessible to external code--and it smacks of DRM, which 1) doesn't and never can work and 2) is generally regarded as malware around here.
Apr
30
answered Should method names getX and setX only be used for fields and have no other effects?
Apr
28
comment Why do many exception messages not contain useful details?
chances are the users will never write it down... and you will be told "Well it said something about a violation..." This is why you use an exception logging tool to automatically generate the error report containing the stack trace and possibly even send it to your server. I had one user one time who was not very technical. Every time she would submit a message from the error logger, it would go something like "I'm not sure what I did wrong, but..." no matter how many times I explained that this error meant the bug was on my side. But, I always got the error reports from her!
Apr
24
comment Which mathematical properties apply to XOR Swap algorithm (and similar bitwise operator algorithms)?
@David: It does on early CPU architectures. An XOR looks at each bit position independently of any other bits, whereas + and - require carry operations where the result of an operation on one bit can affect the operation on neighboring bits. This means it's a more complicated operation to implement, and it used to take multiple cycles before Moore's Law made it cheap to implement the complicated transistor logic needed to do addition in a single CPU cycle. Look up the history of the Binary Adder for the details.
Apr
24
comment Open Source Licensing and Intellectual Property Rights
@gnasher729: But then it would not be an open-source license as recognized by the OSI, or a free software license as recognized by the FSF. (Which are basically the same thing, once you factor out the different ideological slants.)
Apr
23
comment Passing context around AST nodes
@vinnylinux: Then each object is larger, in the amount of the size of one pointer. As I said, it's one of the classic tradeoffs. There's no one "the right answer" to this; it depends on factors such as how many AST objects you're creating, how deep the parse tree will go, and how frequently you're going to access the global context.
Apr
23
comment Open Source Licensing and Intellectual Property Rights
@Snowman: Doesn't the Interbase/Firebird example I gave demonstrate exactly that point? I meant for it to. The open-source community even had to stop calling it "InterBase," but Borland couldn't keep them from continuing to develop it under a new name.
Apr
23
answered Passing context around AST nodes
Apr
23
answered Open Source Licensing and Intellectual Property Rights
Apr
23
comment Is String processing more complex than number processing in programming languages?
It is a built-in primitive type in Pascal. string is actually specified as a language keyword.
Apr
23
comment Why have many programmers moved to using exception handling for input or output?
Survival of the fittest. Exceptions work better than the alternative.
Apr
22
awarded  Good Question
Apr
22
comment Any library or dll to use to give a free lancers project from clients who accept your work but not pay
@PieterB: As I pointed out in the linked answer, there is no such thing as "waterproof enough" in the age of the Internet, period. It really is that simple.
Apr
22
answered Any library or dll to use to give a free lancers project from clients who accept your work but not pay
Apr
21
comment Does using a database server make sense if the application only does things locally?
@DocBrown: Firebird's embedded database provides full SQL support, including referential integrity, ACID guarantees, stored procs and triggers. It didn't used to support multiple concurrent connections to an embedded database, and I'm not sure if that limitation is still in place or not, but the entire SQL feature set is there.
Apr
21
comment In C++ why and how are virtual functions slower?
The virtual method doesn't take longer to execute. It does, however, take (slightly) longer to call. But once the virtual dispatch has been taken care of, the code of the method executes exactly as fast as any other method.