Campbell Ritchie wrote:How much evidence is there for Odersky Spoon and Venners to argue that so many implementations of equals are wrong?
And you can get as much heat rather than light about whether to throw NPE or a different Exception. Nearly as good as spaces vs tabs for indenting
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Thank youWinston Gotkowski wrote:. . . Vaziri, Mandana, Frank Tip, Stephen Fink, and Julian Dolby. “Declarative Object Identity Using Relation Types." In Proc. ECOOP 2007, pages 54–78 . . .
You weren't. But I just remembered the discussions we had here about which Exception to throw for nulls.I don't think I was saying "don't throw NPE". . . .
Campbell Ritchie wrote:And you can get as much heat rather than light about whether to throw NPE or a different Exception.
"Il y a peu de choses qui me soient impossibles..."
Stevens Miller wrote:I don't much care which exception a programmer chooses, provided that programmer is consistent about their choice...
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Winston Gutkowski wrote:My normal rule of thumb is that if I can naturally call a method on the "possibly null" object in the first line of a method, then I let nature take its course; otherwise I check for it explicitly - and in that case I throw an Exception with an explicit message. But whether it's NPE or IAE or even something like IllegalStateException, I really don't care too much.
"Il y a peu de choses qui me soient impossibles..."
"Il y a peu de choses qui me soient impossibles..."
Stevens Miller wrote:Continuing in this (more or less) related sub-thread: how do you guys feel about The Law of Demeter?
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Winston Gutkowski wrote:I don't actually think about it very much because it seems to be a natural by-product of loose coupling...
"Il y a peu de choses qui me soient impossibles..."
Stevens Miller wrote:Some of those encounters take it as gospel, but some point out that rigid obedience to LoD can lead to the proliferation of wrappers for, ultimately, no very good reason. So the question really becomes, for me, what purpose does LoD serve? The preservation of loose coupling is a good answer to that question, and one that, to me, needs no further justification.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |