44,637 reputation
8112192
bio website tech.turbu-rpg.com
location Seattle, WA
age 31
visits member for 3 years, 7 months
seen 2 hours ago
A lifelong programmer who's been coding in Delphi since its initial release and currently makes a living at it.

Oct
3
comment xml based programming languages
Conflating code with data is not an advantage; it's a security hole at the language level. The classic example is SQL injection: every time some site gets hacked and millions of dollars worth of damage is done and tens of thousands of users have to order new credit cards due to a SQL injection exploit, the fundamental reason is because some developer somewhere set up a query in some way that did not properly segregate data from code. Throwing around fancy words like "homoiconicity" does not change this fundamental fact.
Oct
2
comment Optional semicolons
@delnan: Python isn't designed to look like C. It's well-known to be indentation-based and thus highly line-oriented, and It doesn't require semicolons. JavaScript technically does require them; it's inserting one when it finds one missing, which transforms what looks like one syntactically valid statement into two distinct statements with completely different semantics.
Sep
27
comment Why is the yield keyword used in conjunction with return and break, and not by itself?
@Moop: What if you had a function named yield that took a single parameter?
Sep
27
comment Should ** bind more tightly than !, ~?
That just means that JavaScript is poorly designed. (But we knew that already.) And what do you mean that concatenation is more like multiplication, semantically speaking, than addition? I don't see that at all.
Sep
27
comment Should ** bind more tightly than !, ~?
I've never understood the need some people seem to have for coming up with exotic string concatenation operators. + works just fine. Some people complain that it doesn't make sense mathematically, but that's a silly argument because strings aren't math in the first place, and it does make sense intuitively in the sense of "taking this with that and producing a result that is equal to the two inputs combined together."
Sep
22
comment An ideal way to decode JSON documents in C?
@Falcon: You can try that if you really want, but IME union types tend to be more trouble than they're worth most of the time.
Sep
21
comment How to find bottlenecks in an application?
the really good profilers can get expensive. That definitely depends on the language. For Delphi, for example, easily the most useful profiler is a freeware tool simply called Sampling Profiler.
Sep
16
comment Are mutexes assigned to specific regions of memory?
@Qix: Glad I could help. :)
Sep
13
comment Why can't SQL return joined tables in a nested format?
@SeanMcSomething: Unless that widely-used tool is C++ or PHP, in which case you're probably right. ;)
Sep
13
comment Why can't SQL return joined tables in a nested format?
@Matthew: Trees actually make for very readable reports, if they're presented in a collapsible tree control that allows the user to "drill down" through the layers on demand. But if you're talking about printed reports, then yeah, I'd agree.
Sep
13
comment Why can static methods only use static data?
This is a lot less complicated to explain in languages that don't force everything to be part of an object by default.
Sep
9
comment What are the advantages of using LISP and Haskell? Will they make me a better programmer?
The people who say this usually are Lisp and Haskell programmers pushing their own agenda. All of the useful features of Lisp are already in common use in mainstream programming languages. But if these languages really were so much more useful, people would be using them. When's the last time you used a program (any program) written in Lisp or Haskell? (Do any programs written in Haskell even exist? I know Emacs exists, on the Lisp side...)
Sep
8
comment What is a closure?
@RoboAlex: In the heap, because it's an object that looks like a function.
Sep
5
comment How do programming languages define functions?
@Doorknob: Yeah, that's an inherent property of any language, even if it's compiled down to machine code. (The call stack is a manifestation of this behavior.) I'm actually a contributor to a script system that works in the way I described. Join me in chat at chat.stackexchange.com/rooms/10470/… and I'll discuss some techniques for efficient interpretation and minimizing the impact on stack size with you. :)
Sep
5
comment How do programming languages define functions?
@Doorknob: What uses recursion, specifically? Any block-structured programming language (which is every modern language at a higher level than ASM) is inherently tree-based and thus recursive in nature. What specific aspect are you worried about getting stack overflows in?
Aug
30
comment Does macros support make Scala a Lisp dialect?
One of the very first things it does is goes over several examples of highly intuitive, simple Lisp code, and explains how these are not good ways to write your code because they're extremely inefficient. Then he gives some more efficient, but much more complicated examples of how to do it "right." And then there's his "Orbitz uses Lisp" article, where he gleefully holds up a letter from some guys at Orbitz, describing how... they like Lisp because it's fun, but all of the real heavy lifting has to be done in C++ because Lisp (and specifically GC and macros) are just too inefficient.
Aug
30
comment Does macros support make Scala a Lisp dialect?
@Giorgio: There's a huge difference between what he says is good in programming and what he actually shows as good programming. For example, he loves to talk about how Lisp's dynamic features and especially macros make your code better and hardware advances have made efficiency less of a concern, and what you should really focus on is writing intuitive code. But have a look at his book "On Lisp" sometime. (cont)
Aug
30
comment Does macros support make Scala a Lisp dialect?
It's best to take anything Paul Graham writes--particularly on the subject of programming--with a grain of salt, if not an entire shaker. A lot of the ideas he pushes are wrong, and some of them are harmfully so.
Aug
29
comment Example(s) of “A subscript ([ ]) expression that does not evaluate to an array” in C
@AnubhavSaini: A quick Google search turns up msdn.microsoft.com/en-us/library/200xfxh6.aspx which explains it better than I could.
Aug
29
comment What are CPU registers?
@Vatine: Yes, there's a very deep rabbit hole when you start peeling away the layers of abstraction and looking at real implementation. But when dealing with someone asking a beginner-level question, I prefer to give more basic answers that will enlighten, rather than confuse further.