Reputation
Next privilege 200 Rep.
See reduced ads
Badges
9
Newest
 Excavator
Impact
~270 people reached

Aug
12
asked What useful expressiveness will be impossible in a language where an expression is not a statement?
Aug
4
awarded  Analytical
Aug
1
comment Return magic value, throw exception or return false on failure?
I would use exceptions in the non-recoverable situations. E.g. accessing an array out of range, or parsing an word as a number. In situations where you may expect problems, you can provide Try* methods such as "TryParse" or "TryGetValue", where you return false in case of problems (almost anticipated), and fetch the value in some out parameter. The first examples using the -1 value, I think is remniscent of the C days.
May
25
comment When using method chaining, do I reuse the object or create one?
@nimchim you "fluent" methods makes your objects equally mutable. The only solution is to have a separate builder class.
Jul
6
awarded  Autobiographer
Jul
6
awarded  Supporter