Reputation
55,025
Next tag badge:
226/100 score
19/20 answers
Badges
10 156 241
Impact
~1.7m people reached

Aug
21
comment Is macros support in a programming language considered harmful?
What is the difference you are trying to draw here between "the language" and "the compiler"? C's macro system is defined in the language standard, Lisp's macros are, in fact, expanded by the Lisp compiler, and any language implementation is defined, when all is said and done, by the compiler and the standard libraries. Therefore, the phrase "separate from the language and built into the compiler" is nonsensical. Perhaps the distinction you're searching for is that C macros are implemented in the compiler front-end, and Lisp macros on the back-end?
Aug
21
comment In what situations would it be technically 'impossible' to release a system as open source?
@cmaster: Sure, I was just pointing out that punch cards had been around for a long time before either Hollerith or electrical machinery.
Aug
21
comment In what situations would it be technically 'impossible' to release a system as open source?
@DavidThornley Punch cards were invented in 1725 for the control of textile looms, as an improvement on existing, similar technology. They were first used for numerical processing in 1832, and Charles Babbage, in 1837, proposed using them in a hypothetical computing device that never actually got built. Hollerith, who used them for the 1890 US census, was more than a century and a half late to the party.
Aug
20
awarded  Notable Question
Aug
20
comment Clean Abstract Syntax Tree
How do you figure? I've never actually experienced pain with that; the "pain" comes from inherent complexity in the task being performed. In any given stage of the pipeline, either the processing can require that the current stage's processing already be complete on a different node, or it can't. In the latter case, mutability of the AST is irrelevant; in the former, you have to stop what you're doing, look up the other node, and process it either way. If the tree is mutable, you store your results in-place on the tree and return the value; with immutability, that task becomes more complex.
Aug
20
comment Clean Abstract Syntax Tree
-1, because 1) mutable state is not hard to reason about--programmers do it successfully all the time--and 2) your "alternative" is a distinction without a difference, except that the "replace the tree with an altered copy" version is even more complicated and has more moving parts. The only advantage it can even theoretically have over mutable state is if your AST processing is processing multiple subtrees in parallel, which is almost certainly a bad idea in a compiler backend for various reasons that should be intuitively obvious to anyone with experience in that area.
Aug
17
comment Is CType() ever the preferred option?
@Ampt: If metaprogramming is an "edge case", you're doing it wrong. :P
Aug
14
comment Why is there no WSDL type support for Web Api?
@RobertHarvey: SOAP isn't deprecated so much as discredited: it doesn't need to be officially Not Recommended by whoever created it for those in the know to know to recommend against it.
Aug
12
awarded  Popular Question
Aug
12
awarded  Nice Question
Aug
11
comment Why not just make non-parameterized queries return an error?
@Frisbee: Pride goeth before the fall. The reason why decades-old errors like SQL injection and buffer overruns keep getting exploited over and over and over is because they're way too easy of mistakes to make, even for "big boys" who do know better. (Just look at Heartbleed. It was caused by an amateur mistake, but the coder who made it was no amateur!)
Aug
11
comment Why not just make non-parameterized queries return an error?
@jwenting: That's exactly the use case where I specifically said there should be an opt-out for. Your interactive prompt (or SQL management tool) would set that so you can run ad-hoc queries in peace.
Aug
11
comment Why not just make non-parameterized queries return an error?
@amon: The whole point is not to allow that, because even if it's "OK" in its current form, how do we know that in the next update, the requirements won't change and allow the status value to come from user input?
Aug
11
comment Why not just make non-parameterized queries return an error?
If your solution for "it's all too easy to forget--or not know in the first place--to use parametrized queries" is "make everyone remember--and know in the first place--to use stored procs", then you're missing the entire point of the question.
Aug
11
comment Why not just make non-parameterized queries return an error?
@amon: Try to catch that? Easy: if (WhereClauses.OfType<BinaryExpression>().Any(be => !IsParameterized(be))) NeedParameterizedQueryError(); Why is that supposed to be difficult to catch?
Aug
11
asked Why not just make non-parameterized queries return an error?
Aug
7
comment What's the difference between stateful and stateless?
@jgauffin: Performant is the wrong word here. Stateless is less performant since you don't have the opportunity to cache state and have to look it up repeatedly. What it is is more scalable; that's where the load balancing comes in, and the gains from scalability can offset the losses in performance when your system gets big enough.
Aug
6
comment Is type safety worth the trade-offs?
Ugh. Whoever wrote that blog post has no idea what he's talking about half the time. When someone starts off with a ridiculous premise like "compilation is premature optimization," everything that builds upon that premise can almost certainly be safely ignored.
Aug
4
comment What was the reason for the creation of boolean variables?
@JörgWMittag: For the same reason C moved away from so many other things that Pascal got right before C got them wrong: it was created by a hack who cared more about painting a smiley-face over assembly and calling it a high-level language than about actual tested-and-true good language design.
Jul
31
awarded  Good Answer