4,401 reputation
52343
bio website github.com/fredoverflow
location Germany
age
visits member for 4 years, 6 months
seen Mar 29 at 11:18

my user name at gmx point net


Mar
20
awarded  Curious
Feb
27
comment Unintended Iteration of a specific line inside a For Loop
What is the purpose of the line if (temporaryname == temporaryname);
Feb
8
comment Is a programming language a set of programs or a set of instructions?
What do you mean "things a compiler will catch at runtime"?
Jan
19
comment Programming language heritage of the word 'field'
That makes sense.
Jan
18
comment Programming language heritage of the word 'field'
Actually, fields aren't called member variables in C++. They're called data members.
Jan
17
comment Exercise in 1.6 C by Kernighan and Ritchie
@Deduplicator C99? In K&R? You gotta be kidding :)
Jan
16
answered Exercise in 1.6 C by Kernighan and Ritchie
Jan
14
comment Why are return values from compare functions in many languages defined loosely?
Note that this approach only works if the type of position is smaller than the return type of the comparison function. For example in Java, Integer.MAX_VALUE is bigger than -1, but Integer.MAX_VALUE - (-1) is negative due to overflow.
Dec
30
comment What is different between the internal design of Java and C++ that lets C++ have multiple inheritance?
@DVK Nowhere are vtables mentioned in the C++ standard either.
Dec
22
comment How could I avoid singletons in this case?
Many programmers seem to think Singletons are better than global variables because they have been told that global variables are bad, whereas Singleton is a Design Pattern, and Design Patterns are good, right? ;)
Dec
22
comment How to define “or” logically
@octatoan Sure, if his language supports that... which I doubt.
Dec
18
awarded  Great Answer
Dec
17
comment How to define “or” logically
Ah, of course. I knew there had to be a deeper reason :)
Dec
17
comment How to define “or” logically
@JensG Agreed in general, but I have stumbled upon one good use case of comparing against false, namely if (someCollection.add(someElement) == false), which means "if adding the element did not work", and it reads a lot more natural to me than negating via !.
Dec
17
comment How to define “or” logically
@BlueHat But then the two returns would be indented differently ;)
Dec
17
comment How to define “or” logically
How about False ||| False = False and _ ||| _ = True instead? :)
Dec
17
comment How to define “or” logically
@Matthew I doubt his language has ?: if it doesn't even have or :)
Dec
16
awarded  Good Answer
Dec
16
awarded  Nice Answer
Dec
16
comment How to define “or” logically
@user3687688 Can you please clarify the primitives we are allowed to use?