14,270 reputation
13459
bio website
location
age
visits member for 4 years, 5 months
seen 1 hour ago

1d
comment Why don't Python and Ruby make a distinction between declaring and assigning a value to variables?
Oh, nevermind about #1, I misread. And it's not about who gets to use = but that there are three options to begin with. Each and every language feature has to pull its weight, and two of these three do not IMHO.
1d
comment Why don't Python and Ruby make a distinction between declaring and assigning a value to variables?
@supercat Of course I would be opposed, first because of what I wrote in the question, second because two additional syntax constructs has all the downsides of one additional syntax constructs, only more so, and third because your case (1) strikes me as underachieving: If such a check is made, it can and should be made before execution.
2d
comment Advantages of having numeric data types as classes rather than primitives
It's basically a dirty hack when your language design doesn't allow arbitrary types to have the benefits of unboxed/value types but you want the micro benchmark performance for the most common types. (That is not to say that "hack" can't be better than extending the language or giving up on that performance boost, but I do have a distaste for it.)
Apr
21
comment provability of while loop vs for loop
I agree with Kilian. It makes no sense that there should be a difference, as for (init; test; step) { body } has a trivial desugaring to while: {init; while (test) { step; body }}.
Apr
16
comment Why was the Itanium processor difficult to write a compiler for?
All very interesting, but you mostly explain why Itanium failed, whereas the question was about Intel's strategy in pushing Itanium. There is a hint in "Intel would have been happy to have everyone [...]" but it's not clear to me if you're implying whether this was a deliberate decision by Intel (and if so, what you have to support this assertion).
Apr
16
comment Why was the Itanium processor difficult to write a compiler for?
Really-low-level IRs (that are actually specified beyond being internal to one compiler, and intended to be compiled onto specific hardware rather than interpreted portably) are a more recent invention AFAIK. That's not to say they didn't exist at all, but I think the idea was not at all obvious or well-known for quite a while. I mean, most people still associate "bytecode" with "interpreter".
Apr
10
comment Advantages of the imperative style over the functional style
The keyword they'd take issue with is "simpler", which you wisely edited out ;-)
Apr
10
comment Advantages of the imperative style over the functional style
I think FP advocates would contest the first two, though the first only because of different definitions of simpler (you refer to implementation, FP advocates look at denotational semantics or something similar).
Apr
10
comment Why server-side repository merge is a terrible idea in git?
How would that even work? SSH into the (presumably headless) server and do the merge there? What advantage does your colleague hope to gain from that?
Apr
8
awarded  Good Answer
Apr
7
comment difference between generics and interfaces
@scriptin In several languages generics can put bounds on the generic type parameters, which means that the generic can only be instantiated with types fulfilling certain constraints (such as implementing some interface). Since there's no language tag, I assume this is pseudo-code.
Apr
7
awarded  Nice Answer
Apr
7
answered How much work should I place inside a lock statement?
Mar
31
revised is a DoS attack a good analogy of Dining Philosophers?
added 188 characters in body
Mar
31
answered is a DoS attack a good analogy of Dining Philosophers?
Mar
28
comment Should I modify an algorithm I coded for my employer if I remember the code perfectly and want to reuse?
Deliberately introduce changes that improve code clarity. I'm only half-joking. Virtually everything can be made clearer and doing so puts you in a win/win situation.
Mar
22
answered How hidden classes allows faster access to properties in google's V8?
Mar
22
answered Function naming design in a C Library
Mar
20
comment How come the computer doesn't have to read the entire table when the column is indexed?
@gnat That is a rather different breed of index, for (sub)text search, while this is an ordinary data base index on the exact value of some column. The concept is related, but the algorithms and data structures are very different.
Mar
17
comment When is it a good idea to force garbage collection?
@Doval I was also including soft real time, video games are the real time systems I know most about. On a graphic-intense game, the heap will be in the gigabytes and a GC of any significant chunk of that may cause noticeable stutter. Doesn't cost lives or anything, but it's a pretty major defect for a game.