Re:Ruby 3.2.0 Is from Another Dimension
by michaelteter on Wednesday January 04, 2023 @02:12PM
(#34249997)
> arbitrary semantics
I wouldn't go so far to say it is arbitrary (unless someone uses it wrongly :) ).
As far as I know, a bang name only exists if a non-bang name exists as well. And the one with ! indicates an unexpected or comparatively dangerous outcome, such as a mutation, raising an exception, bypassing some normal check, etc.
However, the destructiveness semantic has been significantly overloaded over the time, so each Ruby (Rails) project probably interprets them in a different way, and it ends up having arbitrary semantics.
I'm used to it, but I personally think that for the reason above, it's not a good syntax/semantic to have in a language.