144 reputation
9
bio website Google.Di
location Denmark
age 39
visits member for 3 years, 5 months
seen Dec 18 at 21:41

42 is a pretty number and V is for van


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