Re:What’s New in ES2019
by Xavdidtheshadow on Tuesday July 30, 2019 @01:15PM
(#20566905)
I really love the Ruby naming conventions around this: `!` indicates mutation.
[ Parent
| on HN ]
A method named "method!" means that it's a somehow "unsafe" version of the method "method". A lot of the time it means "destructive version," but if there's no non-destructive version, the destructive one won't have a ! (eg, Array#shift), and sometimes ! means something else (eg, Kernel#exit! is like Kernel#exit, but doesn't run any at_exit code).