27,930 reputation
246108
bio website coderscentral.blogspot.com
location Colorado Springs, CO
age 50
visits member for 3 years, 10 months
seen Jul 17 at 13:34

Started programming on a Control Data mainframe in FORTRAN IV, back when that was still a new thing. Was apparently quite masochistic, because I kept programming anyway. For that matter, I still do...

Gold C++ badge #20
Gold C badge #12
Legendary badge #35


Jul
2
comment How bad is it calling println() often than concatenating strings together and calling it once?
I see you don't know what ad hominem means either. An ad hominem argument is one of the form: "this argument should not be believed because the person making the argument is evil.". I simply pointed to the fact that your argument made no sense: the subject of discussion is levels of abstraction, yet you proclaim that abstractions are irrelevant. That's a solid indication that you don't understand the subject.
Jul
2
comment How bad is it calling println() often than concatenating strings together and calling it once?
@Phoshi: Ignoring abstractions indicates that you don't understand the subject matter, since abstraction is exactly what's under discussion.
Jul
2
comment How bad is it calling println() often than concatenating strings together and calling it once?
@Phoshi: Try with resources isn't even vaguely similar to RAII. RAII allows the class to manage the resources, but try with resources requires the client code to manage the resources. The features (abstractions, more accurately) that one has and the other lacks are entirely relevant--in fact, they're exactly what makes one language higher level than another.
Jul
1
comment How bad is it calling println() often than concatenating strings together and calling it once?
@200_success: Java doing the string concatenation at compile time seems to come down to §15.18.1: "The String object is newly created (§12.5) unless the expression is a compile-time constant expression (§15.28)." This seems to allow but not require that the concatenation be done at compile time. I.e., the result must be newly created if the inputs are not compile-time constants, but no requirement is made in either direction if they are compile time constants. To require compile-time concatenation, you'd have to read its (implied) "if" as really meaning "if and only if".
Jul
1
comment How bad is it calling println() often than concatenating strings together and calling it once?
Actually, it's Java that requires explicit memory management. In C++ I write something like: MyClass c; and it allocates an instance of MyClass. In Java I have to use MyClass c = new MyClass(); to allcoate it. Better still, RAII let's me automate management of other resources as well, where Java forces me to use a try/catch/finally in a lame imitation of what C++ destructors provide much more cleanly. Your own argument leaves us with only one reasonable conclusion: Java is a lower level language handicapped by lower-level I/O facilities.
Jul
1
comment How bad is it calling println() often than concatenating strings together and calling it once?
Throughout I point to the objective basis for Java being the lower level language. Not sure what line terminators you're talking about.
Jun
13
comment Memory read/write access efficiency
If it's small enough to allocate directly on the stack, that's almost always preferred.
Jun
13
comment Memory read/write access efficiency
Correct about memory usage. Efficiency can vary. On really small microcontrollers and such, memory access may be faster than multiplication, which could make 3 a poor choice. As for a fourth option: perhaps avoid using malloc at all and allocate the data directly on the stack (but note that this often imposes a much lower restriction on size).
May
10
comment How are the skills used in typical interview questions applied in the real job?
@MainMa: That doesn't surprise me--that's why I repeated "as he's phrased it" a couple of times in my answer.
Apr
26
comment In Java, what are checked exceptions good for?
@owlstead: Thanks--I probably should have been more careful with the wording there. The point wasn't so much that you actually had to catch the exception as it was that every intermediate level of code needs to be aware of every exception that might flow through it. As for the rest: having a tool that makes it quick and easy to make a mess of your code doesn't change the fact that it's making a mess of the code.
Feb
19
comment Is there any difference learning OOP on different programming languages?
@KRyan: In case you care, there is one other prototype-based OO language that's named Self.
Dec
17
comment Any programming languages that support Generics exclusively and have no OOP support?
Ada 83 would be another to consider. To an extent, most Lisps are as well (other than those like Common Lisp, which also supports OO).
Nov
15
comment Making an algorithm more efficient
You probably want to use a quadtree.
Nov
9
comment Earliest use of Comments as Semantically Meaningful Things in a Program?
#pragma came from Ada (which left of the #, so it was just pragma).
Aug
19
comment Is an atomic action supposed to be deterministic?
@busy_wait: No, I'm treating any state upon which the code depends as input to that code, since it is.
Aug
16
comment How to migrate my thinking from C++ to C#
@Andrew: Let me summarize: in C++, you get uniform, semi-automatic management of all resources. In C#, you get completely automatic management of memory -- and completely manual management of everything else. There's no real changing it, so your only real question is not "how do I fix this?", only "how do I get used to this?"
Jul
17
comment How to provide a ubiquitous object without including it in every parameter list
@Chap: Yes -- if you have to log successes, that changes the situation entirely (and is where AOP starts to look like a much better idea).
Jun
11
comment What makes Common Lisp “big”?
@jozefg: It does, but most of that is more like API stuff than part of the language -- including quite a bit that has no direct analog in the CL spec, so an implementation that included an analog (which I believe most do) would have still more documentation on that in addition to the CL spec itself.
May
10
comment Why is there no 'finally' construct in C++?
@Mikey: I'm talking about the comments on all the answers, not just this one -- things like Kaz's apparently unthinking rejection of everything added in C++11 as "cruft" and Mason Wheeler's usual rejection of everything different from Delphi as obviously wrong. These have inflated the "discussion" tremendously, but provide little proof of anything (except, possibly, proof about the attitudes of the people expressing the opinions).
May
10
comment Why is there no 'finally' construct in C++?
@Mikey: The extensive discussion proves nothing about the language, and a great deal about people being willing to "discuss" matters of which they're clearly ignorant.