1,761 reputation
613
bio website kdgregory.com
location
age
visits member for 3 years, 9 months
seen 2 days ago

Aug
25
comment Is method overloading anything more than syntactic sugar?
I'm also confused by your comments on compile-time type safety. First, because it assumes a statically-typed language, which doesn't seem to be a requirement. And second, because it seems to diverge from the idea of emulating language syntax using other syntax from the language. If you're going to consider compiler metadata to be under consideration, then you have to consider all metadata, including the basic keywords of the language. In which case, I contend that nothing is syntactic sugar.
Aug
25
comment Is method overloading anything more than syntactic sugar?
I'm not sure if I muddied the water by leaving variables (memory-based storage) out of my list of basic building blocks, but they are of course implied by Turing-completeness, and I assumed that you mentally filled in my omission.
Aug
25
comment Is method overloading anything more than syntactic sugar?
@Doval - I'm not sure where you're going with this. It seemed that you argued that one could emulate overloaded functions by hand-coding mangled names. Which I agree with. But then your examples of class implementation confuse me: a class is simply a collection of data associated with operations; as long as you have a unique identifier for a class, and maintain information about class hierarchy, then of course you can do all of that run-time type examination (as C-Front showed, by translating C++ to C, classes are just syntactic sugar over a struct).
Aug
25
awarded  Nice Answer
Aug
25
comment Is method overloading anything more than syntactic sugar?
@Doval - other than if, while, logical AND, and logical NOT, what isn't syntactic sugar?
Aug
25
comment Is method overloading anything more than syntactic sugar?
As I said, you could take the approach that all languages (including machine languages) are simply syntactic sugar on top of a Turing machine.
Aug
25
answered Is method overloading anything more than syntactic sugar?
Aug
8
answered Proper sequence of actions for merging using SVN?
Aug
8
comment Is the inconvenience about merging in SVN prior to v1.5 obsolete by now when lack of metadata isn't the case anymore?
@TorbenGundtofte-Bruun - I don't have the time right now to give such an answer, but I will say "don't fear SVN." It has limitations, but so do DVCS's.
Aug
6
comment Quantifying the advantages of a modern version control system
The problem with bringing up specific points of comparison is that you have to know the alternatives extremely well, or you will be ripped apart. In the case of this response, the only point that's valid is the "distributed vs centralized" one, and even then you have to be prepared for "you mean every possibly-disgruntled employee has our entire source repository on their laptop?!?"
Aug
6
comment Quantifying the advantages of a modern version control system
+1 for pointing out that it's a "people" problem rather than a technology problem.
Aug
3
comment Is my 'variable-storing area' basically a 'heap'?
How are parameters different from any other variables? Do you plan to copy all parameters into your variable storage table when a function starts?
Aug
2
comment Uses for System.gc() in Java
@JeroenVannevel - It's useful if you know the behavior of your particular JVM. The documentation is written for the lowest common denominator. And if you relied strictly on documentation, you'd have to assume that your JVM might not even have garbage collection.
Aug
2
comment Uses for System.gc() in Java
This used to be a common Swing technique: you trigger GC when you're minimized. With compacting garbage collectors, this would reduce the number of heap pages that could be swapped to disk, and therefore improve restore time.
Jul
23
comment Passing data between hundreds of objects in java
@user2864336 - I think of the Observer pattern as being 1:M between a source of events and its observers. An event bus, by comparison is a single object where multiple publishers can publish events and multiple subscribers can listen for them (M:M). This could be a message queue, a "production-grade" container like Mule, or a simple object that accepts events and publishes them (in which case you could call it an Observable for multiple Observers -- and use Java's Observable/Observer implementation to implement).
Jul
23
answered Passing data between hundreds of objects in java
Jul
23
comment Algorithm to reverse engineer permutation
(and if yes, they produce the same permutations, then you have your answer)
Jul
23
comment Algorithm to reverse engineer permutation
Would the source strings "AB", "CD" produce the same set of permutations as "A", "BC", "D"? If no, how will they differ?
Jun
13
comment Why/how does Java use a controlled mechanism to pause threads for GC?
If I interpret your question correctly, you're asking whether having specific sync points inside JIT-compiled code will allow you to put object pointers in registers while you're in that code. If that's correct, then yes, that seems reasonable to me. Moreover, I think you have to do this anyway, since I don't believe that X86 (is that your platform?) supports double-indirection-with-index off the stack (but it's been nearly 30 years, so I could be very wrong about that).
Jun
13
comment Why/how does Java use a controlled mechanism to pause threads for GC?
As for specific mechanism for JIT-compiled code (because suspending an interpreter is also trivial), I suspect that depends on specific version of the JVM. All of which begs the question: why does this matter to you? If it's just interest, I'd suggest reading the source.