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

May
28
comment What is the etymology of the “dot” operator for string concatenation?
+ is an ideal choice for concatenation, because no one expects joining two strings together to be an arithmetical operation in the first place. Saying "+ is bad because it doesn't have the properties of arithmetical addition" is only a valid claim if + in this context not having the properties of arithmetical addition would violate POLS and confuse users, but since no one expects it to, it is not a bad thing. It's far more intuitively correct, producing a string that is the result of adding the contents of one string to another, than . is, which intuitively... does what?
May
26
comment Non-null alternative to Void (Java unit type)
@Ordous: Hence this is not a question of "I want a set, what should I use? I've got a Map.", but rather "I've got this Map, I'd like to reuse the code as a Set, but without copy-pasting". And the answer is still valid: "don't do that." This looks like a classic case of "when all you have is a hammer..."
May
26
comment At what point do you drop attribution to original work?
This is a philosophical question that people have been struggling with for thousands of years.
May
21
comment Why is the Java bytecode instruction set not orthogonal?
Wasn't Java actually originally designed for embedded systems? (In the early-to-mid 90s, well before the advent of the Arduino and similar, those definitely qualify as memory-constrained!)
May
12
comment Why dynamically typed languages do not let the developer specify the type?
Metaprogramming is "not easy to describe in a static manner"? When I work with Boo, I find that to be the exact opposite of the truth: The AST is defined in a statically-typed, object-oriented hierarchy, and so writing visitors and code generators becomes that much easier because each AST node carries around well-defined information about its identity and semantic content just from being a member of whatever class it is.
May
10
comment How do web servers enforce the same-origin policy?
@Benny: That's highly unlikely. The Referer line is generated by the user's web browser, and the user is the victim here, not the attacker. He has no reason to forge the Referer, and the attacker doesn't have the opportunity to do so.
May
6
comment What are the chances of Google's Go becoming a mainstream language?
@hippietrail: It came in at #12 in the recent Code2014 poll. (By comparison, Objective-C--and the entire iOS platform by association--came in at #16.) Everything above it is a major language that pretty much every developer knows about even if they don't actually use it. So it would seem that it's gotten pretty big pretty quickly. Granted, it's a pretty informal poll, but it gives a decent "finger on the pulse" snapshot of current developer attitudes.
May
5
comment How to operate a computer without an operating system?
@JörgWMittag: That may have been true in 1981, when that article was written, but today it's a very different deal. Heck, in 1984 it was a very different deal! A better definition would be, "the Operating System is the standard library for the platform itself." Also, any paper that cites Lisp, APL and Smalltalk as "examples of success" when all three have been anything but loses a lot of credibility right there.
May
4
comment Is the regex syntax in .net 3.5 the same as the regex syntax in the latest version of .net framework in c#?
That's actually referencing an old joke about how if you try to solve a problem with regular expressions, now you have two problems.
May
4
comment Is the regex syntax in .net 3.5 the same as the regex syntax in the latest version of .net framework in c#?
If it's changed, then do you now have three problems?
May
4
comment Why does C provide language 'bindings' where C++ falls short?
@DocBrown: Then feel free to write an answer that answers that. But in the meantime, count the upvotes. I'm clearly not the only person around here who thinks that I answered what's being asked.
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
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
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
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.