Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

! in ruby means "dangerous", which is actually poorly defined. In some major libraries it is used to mean exception raising, in some it means self-mutation.

  The bang (!) does not mean "destructive" nor lack of it mean non
  destructive either.  The bang sign means "the bang version is more
  dangerous than its non bang counterpart; handle with care". Since
  Ruby has a lot of "destructive" methods, if bang signs follow your
  opinion, every Ruby program would be full of bangs, thus ugly.
-matz


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: