[Nitro] Build scripts as modules or plain scripts
transfire at gmail.com
transfire at gmail.com
Thu Jan 4 11:54:59 EST 2007
gabriele renzi wrote:
> transfire at gmail.com ha scritto:
>
> > Of course this effectively puts encapsulation, at least at the top
> > level, on a per-file basis. But in many respects that seems kind of
> > nice. It increases flexability and reduces configuration complexity.
> >
> > So what do your think? Is this technique worth promoting? Or am I being
> > silly and should just wrap all my scripts in modules?
>
>
> first: adding the "as_foo" just adds useless complexity, imho, just load
> a module and include id when needed.
>
> Then, if you just add
>
> and a directory is a module, too so that
> require 'foo'
> loads module Foo
> and
> require 'foo/bar'
> requires module Foo::Bar
>
> and you have the python's import system, which is a very good thing imo
> and could reduce ruby's stdlib size of a 1/2% :)
>
>
Mind if I cross post this on ruby-talk? I'd like to see waht others
have to say about it.
T.
More information about the Nitro-general
mailing list