[swift-evolution] [Review] SE-0023 API Design Guidelines

Brent Royal-Gordon brent at architechies.com
Fri Jan 29 16:09:30 CST 2016

> Also, an exclamation mark (!) is generally used to indicate that a function/method mutates `self`:

It's a common misconception that `!` means "mutates" in Ruby. It actually means something like "more dangerous variant". The danger being indicated is *often* that it mutates, but sometimes it's that it throws an exception (rather than returning `false` or `nil`) or bypasses validations. There is also a rule in Ruby that you should never use `!` unless there's a non-`!` variant.

Brent Royal-Gordon

More information about the swift-evolution mailing list