From: Christopher Dicely Date: 2011-06-20T22:54:00+09:00 Subject: Re: RFC - One word alias for require_relative 2011/6/17 Ilias Lazaridis : > On 17 Ιούν, 21:17, Gary Wright wrote: >> I can't believe I'm adding to this conversation... >> >> Ruby already has an idiom for naming two related methods so how about: >> >> require "a/b"        # the usual >> require! "a/b"       # require relative to __FILE__ > > This could become my new favourite. > > "!" is used as a convention, to clarify that a method "modifies the > object" This misstates the existing convention; see below. > > "!" could be used for stand-alone functions (e.g. the "flat" Kernel > functions which do not operate strictly on an object) to clarify (by > convention) "you should know what you do, possible risks" or simply > "alternate implementation". This second thing is actually the current convention for "!" for normal methods (e.g., not just "flat" Kernel functions.): "!" indicates a more-dangerous alternative when the base name is already used. It doesn't always indicate a mutating method, and mutating methods don't always have it. OTOH, require_relative is much more clear as to what it is doing than require! would be, amd. anyway, require! is 8 characters, not 7.