14,600 reputation
13460
bio website
location
age
visits member for 4 years, 6 months
seen 5 hours ago

Feb
16
comment Why are language features more popular than compiler design?
@EECOLOR There trivially are a finite number of programming languages. But no, realistically, there is far too much diversity in languages for a single AST, a single IR, or a single interpreter.
Feb
16
comment Why are language features more popular than compiler design?
Have you actually tried implementing (or even just thought in detail about how to implement) any of that? The longer I think about it, the more problems I find. I've only been at it for two minutes and I already have so much material that beating it into the shape of a good answer takes far more time than I'm willing to invest.
Feb
16
comment Is it possible to avoid SQL injection by not using a Query Language for most tasks?
What value do you think this would add? Why should DBMSs support this, and why should DBMS customers want it?
Feb
14
comment Being among the best to the worst. What to do?
@TomAu For starters, it's not asking for career advice. It's asking how to handle a (programming-specific) workplace situation.
Feb
14
awarded  Good Answer
Feb
11
comment How should I unit test mathematical formulae?
@Evan Testing can never rule out bugs, only find them. Generally this process does not continue ad infinitum though, since you keep the accumulated tests around, and hence (should) never re-introduce any of the bugs already discovered, thus steadily improve reliability. That's what regression tests are all about. There's really no reasonable way to test all inputs. Testing methodology is about getting the most bang for the buck, and a bug which has already occurred in the wild is hard to beat at that: You already know that this problem can occur, and the test case is practically free.
Feb
11
comment How should I unit test mathematical formulae?
I don't see how the first approach (test some reasonable values, add new ones as failures are exposed by other means) defeats the point of having a unit test. Many unit tests are regression tests. Turning real bug reports into test cases is a valid, useful and widespread method of creating regression tests. I don't really see all that much potential for that though, if the implementation is really just straightforward transliteration of a formula that already does what you want. In which case a few manually-picked values (try to choose edge cases) makes a perfectly fine unit test.
Feb
11
awarded  Nice Answer
Feb
11
comment Bridging the gap between abstract machines and computer achitectures?
@Tim I'd guess that course just takes Turing machines as a starting point to introduce the concept of an abstract machine, then quickly moves on to more useful abstract machines.
Feb
11
comment Bridging the gap between abstract machines and computer achitectures?
@amon It appears you've already written most of an answer, why let it "go to waste" in a comment?
Feb
11
revised Bridging the gap between abstract machines and computer achitectures?
added 22 characters in body
Feb
11
answered Bridging the gap between abstract machines and computer achitectures?
Feb
8
comment Is a programming language a set of programs or a set of instructions?
@FredOverflow From the context, that is a typo and should read "[...] catch at compile time".
Feb
8
answered Is a programming language a set of programs or a set of instructions?
Feb
8
comment Is it not direct usage of primitive pointer types form of Primitive Obsession?
What disadvantages does the pointer have, or rather, what problems would a CItemHandle class solve? Using a bare string for a human name is bad because, among other things, the type is non-descriptive, it may allow meaningless operations, and it can facilitate semantic confusions. Not because some deity proclaimed that Thou Shalt Not Use Primitives.
Feb
8
comment When, if ever, are basic concurrency optimizations generally made?
Who are you talking to? That's completely, utterly wrong in all remotely mainstream languages. So wrong, in fact, that I can't help but wonder whether you misunderstood those people.
Feb
4
comment What limitations does the JVM impose on tail-call optimization
@supercat I'm not sure where we're disagreeing, or whether we're even disagreeing at all, so I'll call it a day here.
Feb
4
comment What limitations does the JVM impose on tail-call optimization
@supercat "May" in that it does not make a difference for a lot of code (that which doesn't inspect the stack and does any of the other things that can detect tail calls). Of course the point of enabling tail calls is having them guaranteed.
Feb
4
comment What limitations does the JVM impose on tail-call optimization
@supercat D'oh! That neatly dismantles Jörg's objection for the general case. Have the programmer opt into a tail call, accepting that it may alter semantics.
Feb
4
comment What limitations does the JVM impose on tail-call optimization
@JörgWMittag You make a good point, a JVM can easily detect the pattern call something; oreturn. The primary job of a JVM spec update would be not to introduce an explicit tail-call instruction but to mandate that such an instruction is optimized. Such an instruction only makes compiler writers' jobs easier: The JVM author doesn't have to make sure to recognize that instruction sequence before it gets mangled beyond recognition, and the X->bytecode compiler can rest assured that their bytecode is either invalid or actually optimized, never correct-but-stack-overflowing.