From: Ilias Lazaridis Date: 2011-06-18T10:35:35+09:00 Subject: Re: RFC - One word alias for require_relative On 18 Éïýí, 02:30, Yukihiro Matsumoto wrote: > Hi, > > In message "Re: RFC - One word alias for require_relative" >     on Sat, 18 Jun 2011 06:40:36 +0900, Ilias Lazaridis writes: > > |Solutions: > | > |require! 'lib/alter' # 2011-06-17 by Gary Wright > |involve  'lib/alter' # 2011-06-16 by Sam Duncan > |locally  'lib/alter' # 2011-06-11 by Rob Biedenharn > |uniload  'lib/alter' # my > |request  'lib/alter' # my > |include  'lib/alter' # my > |relative 'lib/alter' # my > > |I like the word "involve" more, but as "require!" reminds clearly the > |original "require", it's the first choice. > > Unfortunately the general rule for the "!" in the method name, at > least in the standard library, is that it means "more dangerous than > the version without bang".  Since require! does not follow this rule, > and not worthy to change the rule.  So it's no chance to have require! > in the standard library. I've read somewhere that it's a security risk to have the local directory in the library path (which "require" accesses). Thus "require_relative" became necessary. require_relative *has* the local directory in it's "path", thus it is somehow "more dangerous than the version without bang". It is "more powerful than the version without bang" - and thus "more dangerous". Thus it looks like it follows the "!" rule! - But even if not, the "!" rule could be extended "!" for object-methods is used as usual, to indicate that a method "modifies the object" or that it is "more dangerous". "!" for "flat" functions (e.g. "flat" Kernel functions which do not operate strictly on an object) is used to indicate: * "you should know what you do, possible risks" (= more dangerous), or * "more powerful implementation", (essentially this means: more dangerous). . -- http://lazaridis.com