Nov
24
comment Function guaranteed to never return the same value twice
I think the assumption that the code will only be used for less than five hundred years is a valid assumption. If you simply return increasing values in 64bit storage, you're fine for quite a while. At 1 call per us, in 584555 years.
Nov
8
comment Is it good practice to rely on headers being included transitively?
@Dunk I think you misunderstood the problem. With either of his suggestions that shouldn't happen.
Oct
10
comment How can IO cause side effects in Functional Programming?
If one distinguishes between reading the first character from stdin vs reading the next character from stdin, then it's no different from reading from an array or list, and is totally cachable.
Oct
10
comment How can IO cause side effects in Functional Programming?
What about input?
Aug
29
comment Are a class's methods stored only once in memory?
@delnan: I checked, in places where I thought I was duplicating methods, lua was smart enough to use references. I stand corrected. (hooray for sane languages!)
Aug
28
comment Are a class's methods stored only once in memory?
@delnan: Lua makes it easy to accidentally give each instance it's own copy of the type's methods.
Aug
28
comment Why don't compilers inline everything?
Do inline functions improve performance?
Aug
26
comment Multithreading: am I doing it wrong?
OP says API can only play one note at a time
Aug
23
comment Why does void in C mean not void?
Also note that Java and C# do have the same concept, they simply call it Object in one case to disambiguate.
Aug
11
comment How can a statically typed language support duck typing?
@Snowman: Iterator requires a lot more than that, namely operator*...
Jun
26
comment Why is the finalize method included in Java?
With #2 sounds like the native peer is a native resource that requires a safety net and should have a termination method, and thus shouldn't be a separate point.
Jun
11
comment Maintaining Two Separate Software Versions From the Same Codebase in Version Control
modern Windows is designed this way, all versions have all the same code, and have features unlocked depending on the license key in use.
May
28
awarded  Informed
May
12
comment Does C++ compiler remove/optimize useless parentheses?
or from www.thedailywtf.com: int five = 7; //HR made us change this to six...
Apr
4
comment Why is “Select * from table” considered bad practice
@AdrianoVaroliPiazza: What he meant was that performance (via being explicit about columns) is a better reason to avoid * than the inability to access by column. He was NOT suggesting that * is a good thing.
Apr
3
comment Why is “Select * from table” considered bad practice
@jwenting: I think gbjbannb misunderstood you as saying that performance matters more than correctness, and then you affirmed this misunderstanding. What you originally said was performance is more correct than convenience, not correctness, which I think is far less disagreeable.
Mar
26
comment How to data model more than one 'last name'?
@FedericoPoloni: Anyone looking up a patient by the last name probably knows the patient's last name.
Mar
11
comment How can you decompose a constructor?
Named Parameter idiom
Feb
19
comment Is rethrowing an exception leaking an abstraction?
Exceptions should be about causes not about who throws them. If your code can have a file_not_found, then it should throw a file_not_found_exception. Exceptions should not be library specific.
Dec
5
revised Is there a known algorithm for scheduling tournament matchups?
added 273 characters in body