|
|
|
|
|
by psnj
6064 days ago
|
|
> 1. If you are going to assert these things, don't do it in the middle of the method - do it in a place that makes sense (start of the method). Sure, I can see that -- assertions in the middle of a method might well indicate that maybe that bit should be split into more than one method. But the article goes further than that: they seem to complain about assertions guarding parameter values. I really don't get that. Actually, I'll go one further: complaining about that is unjustifiable. Anyway, I also don't always get the particular flavour of OOP dogma that Java devs sometimes seem to promote. It certainly feels different to me from Python world, and I suppose it is. When I see the phrase "silently does nothing" I feel vaguely uneasy. |
|