Reputation
59,357
Next tag badge:
187/100 score
18/20 answers
Badges
12 176 258
Newest
 Enlightened
Impact
~2.0m people reached

Nov
23
comment Is there anything that can be done with recursion that can't be done with loops?
@Pinoniq To understand recursion, you must first understand recursion.
Nov
22
comment Is there anything that can be done with recursion that can't be done with loops?
Therefore, the one thing recursion can do that loops can't is make some tasks super easy. And the one thing that loops can do that recursion can't is make some tasks super easy. Have you seen the ugly, unintuitive things you have to do to transform most naturally-iterative problems from naive recursion to tail recursion so they won't blow the stack?
Nov
20
comment Why do you reduce multiple inheritance to the diamond problem?
@DavidArno: Sorry, but that's a ridiculous and completely wrong idea. After Dijkstra not only declared goto to be "considered harmful" but proved that it could be trivially replaced with structured-programming constructs in every case, its use was phased out in high-level languages and today it's barely used anywhere by anyone for anything. But this doesn't compare with inheritance in any way.
Nov
20
comment Why do you reduce multiple inheritance to the diamond problem?
@DavidArno: ...and plenty of other problems appear in its place, the problems that were solved by the invention of inheritance. It exists for a good reason, you know.
Nov
16
comment Are there CPUs that perform this possible L1 cache write optimization?
It's said that there are two truly difficult problems in computer science: cache invalidation, naming things well, and off-by-one errors. This is an example of why the first of these is tricky.
Nov
11
comment Differences between XML and JSON for data exchange
Are you kidding? Lisp has immense amounts of ceremony, precisely because it's so trivial to parse: all of the useful semantic data built into a richer language's parse tree isn't there in Lisp, so all that burden gets shifted onto the developer's shoulders.
Nov
8
comment Composition over inheritance but
"Favor composition over inheritance" is a silly idea that makes exactly as much sense as "favor saws over drills." They're two different tools that are appropriate to use in two different use cases, and the times when you can really use either one interchangeably are actually pretty rare.
Nov
5
comment Why does Math.min work with a one element array
It's JavaScript. This is far from the weirdest type conversion/coercion issues you'll find in the language...
Oct
29
comment Why is the minus sign, '-', generally not overloaded in the same way as the plus sign?
@JanDvorak: There's nothing particularly "Haskelly" about that; that's basic strong typing.
Oct
29
comment Why is the minus sign, '-', generally not overloaded in the same way as the plus sign?
@smci Seems to me 5 + False should obviously be an error, since a number is not a boolean and a boolean is not a number.
Oct
28
comment What could “move an instruction without a 16-bit bus” mean?
Yeah, the show did a good job with the tech. It would have been a lot more enjoyable, though, if they'd bothered to make any of the principal characters sympathetic. After a while you just end up mired in Darkness-Induced Audience Apathy.
Oct
28
comment Why is the minus sign, '-', generally not overloaded in the same way as the plus sign?
@DigvijayYadav: So you just described two possible ways to implement this, and there's a good argument to consider each one as valid, so we're already making a mess of the idea of specifying this operation. :P
Oct
28
comment Why is the minus sign, '-', generally not overloaded in the same way as the plus sign?
@amon: So what do Perl and PHP use for member access, then?
Oct
27
comment Is the Perl default variable like an FP monad?
Part of the reason monads are so frequently seen as confusing is because they're often explained in FP terms, and FP languages are confusing enough as it is. Have a look at Eric Lippert's series explaining monads in much more approachable OO terms. He actually manages to make the concept make sense.
Oct
21
comment What's the best/most efficent way to create a semi-intelligent AI for a tic tac toe game?
Start with a national defense AI...
Sep
30
comment Is TCP still considered siginificant overhead compared to UDP?
@btilly: IIRC Transmeta failed because at its core, it was essentially an emulator of a third-party system, and emulators have a lot more technical challenges to overcome in addition to the overhead imposed by emulation, particularly when they're a third-party system that you don't have the specs to. In CISC-to-RISC translation, on the other hand, the same engineers are designing both sides of it and they can leverage that.
Sep
30
comment Is TCP still considered siginificant overhead compared to UDP?
@ArthurHavlicek: Much of this is first-mover advantage. It's likely that things will be quite different in the years to come, now that Intel has gotten into the mobile CPU market. (See sealedabstract.com/rants/why-mobile-web-apps-are-slow for the reasons why. Search for "The hardware angle" if you don't have the patience to read through the whole thing--it's very long--but you should read through the whole thing anyway, for context.)
Sep
30
comment Why do we need a seed in Random Number Generators?
I would actually call that two different languages, since the most reasonable definition of "a programming language" is that it's defined by its compiler and standard libraries, including the runtime. Change either one in a non-trivial way, and you have a different language that will be used in a different way. (Who can doubt, for example, that C# 2 with generics is a fundamentally different creature than C# 1?) Therefore, the RNG implementation is a part of the language.
Sep
30
comment Why do we need a seed in Random Number Generators?
Languages tend to have their own implementations of pseudo-random number generators, so you cannot know how a pseudo-random number generator works in any programming language. On the contrary, if you can't know how [insert feature here] works in any language, there's something very wrong with that language and you probably shouldn't be using it.
Sep
30
comment Which language is a BIOS written in?
Cross posting is bad enough, but when it ends up on the Hot Network Questions in both versions, that's just beyond the pale...