On Monday, June 20, 2011 11:10:35 AM Ilias Lazaridis wrote:
> On 20 Ϧ, 16:54, Christopher Dicely <cmdic... / gmail.com> wrote:
> > 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.
> 
> Which would mean the rule apply, and the question is:
> 
> Is "require_relative" more dangerous than "require", thus "require!"
> would fit the naming-convention?
> 
> I say:
> 
> yes, because you can include everything from your source-tree, where
> "require" loads only from predefined paths.

False.

require can also load from absolute paths -- that is, require_relative can be 
implemented in terms of __FILE__ and require.

require_relative can also load from absolute paths, so on that score, they are 
even.

If you do not specify an absolute path, require_relative will only attempt to 
resolve things relative to the current file. By contrast, require will attempt 
to resolve things relative to an arbitrary number of paths in $: -- which, for 
that matter, can be configured by the caller.

If anything, require_relative is "safer" than require. However, neither of 
them is truly "dangerous" now that '.' is no longer in the default load path. 
When it was, we might've considered require to be actually dangerous, while 
require_relative is not.