Re:Why Objective-C is Hard
by Argorak on Wednesday March 07, 2012 @01:05AM
(#3674465)
The guideline is: if your method does something that the programmer should think twice about or shouldn't use without proper knowledge (e.g. didn't read the docs), use !. An incomplete case of usages:
This doesn't mean that every method needs to be suffixed by ! if it does something destructive. `delete` in the context of an ORM is standard, so it doesn't have a bang. The whole point of `pop` is to manipulate the receiver: no point in warning about it. IO is always destructive, so ! doesn't make sense either.
[ Parent
| on HN ]
There are no comments on this comment yet.