From: Phillip Gawlowski Date: 2011-06-12T04:51:52+09:00 Subject: Re: RFC - One word alias for require_relative On Sat, Jun 11, 2011 at 9:12 PM, Intransition wrote: > > This idea of course presents backward compatibility issues, but it is > a way to do it that actually improves the robustness and efficiency of > the load system. If it breaks backwards compatibility, it's neither effective nor robust, I'd say. Especially since your idea introduces a *lot* of mental overhead on my part: Do I want a local or a global file? What's the syntax for a global require, again? And it's almost, but not entirely, completely unlike accessing nested constants (Module::Class vs ::file). And running non "::require"-aware code leads to fun bugs and security issues (imagine a "ostruct" file in the load path that wipes your filesystem. The joys...). On the flip side, require and require_relative make it completely clear that I load either globally or in relation to my source files *without* having to remember what a particular bit of line noise means. If the issue is that you have to type so much more, set up a macro in your favourite editor. Or if you happen to use AutoHotKey: ::r#::require ::rr#::require_relative (using the # to avoid situations where you want to type literal "r" and "rr"s) You can then tell your project manager to do some actual work, instead of worrying about 8 bytes worth of storage. -- Phillip Gawlowski A method of solution is perfect if we can forsee from the start, and even prove, that following that method we shall attain our aim.                -- Leibnitz