Reputation
4,528
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
5 27 43
Impact
~298k people reached

Jan
13
awarded  Notable Question
Jan
1
awarded  Notable Question
Nov
18
accepted Where did the notion of “one return only” come from?
Oct
24
awarded  Notable Question
Sep
26
awarded  Yearling
Sep
20
comment Exercise in 1.6 C by Kernighan and Ritchie
@EsbenSkovPedersen Why?
Aug
29
comment Where did the notion of “one return only” come from?
@yegor256 return new If? This is a joke, right?
Apr
16
comment I don't understand the arguments against operator overloading
Overloading existing operators and inventing new operators are not the same thing, but +1 from me.
Apr
11
comment Does Go implicitly discourage getters and setters and encourage direct member access?
@RichardTingle If you change the implementation of a setter later on, there is a high risk of silently breaking all your clients, because their assumptions about valid inputs may no longer hold.
Apr
11
comment Does Go implicitly discourage getters and setters and encourage direct member access?
Getters and setters are non-idiomatic in any OO language.
Mar
20
awarded  Curious
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.