<div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I don't really get the point you're making here. What reusability? If I<br>set some attribute, I always know what attribute I'm going to set on
<br>what object. Why would I want to use a library without loading the<br>library? Why would I want to configure something I do not use?<br></blockquote></div><br>I have alredy explained this (maybe on IRC though). Let me give you an example. You setup all your settings in a single configuration file:
<br><br>conf.rb<br><br>Og.create_table = ...<br>Template.root = ...<br>...<br><br>For this to work you need to make sure that Og and Template are already defined...<br><br>Lets say you want to use only the Template setting from a script you want to write. You cannot reuse
conf.rb (you will get errors along the line that Og is not defined)<br><br>An alternative (that is supported in the current implementation) would be to define your settings like this:<br><br>Configuration.Og.create_table
= ...<br>Configuration.Template.root = ...<br><br>The problems:<br><br>1. too long<br>2. Does not work nice with namespaces (ie Configuration.My::Name::Space.setting = ...)<br>3. values are accessed like this: Configuration.Og.create_table.value
(notice the exta .value)<br><br>Thats why we need a better configuration system. Using global variables would fix all the problems but we get objections ;-) <br>So until someone proposes something better (well ok, IOC may be better, but I think it will make the code too complex...) we will postpone the decision for the future.
<br><br>-g.<br><br> <br>-- <br><a href="http://blog.gmosx.com">http://blog.gmosx.com</a><br><a href="http://cull.gr">http://cull.gr</a><br><a href="http://www.joy.gr">http://www.joy.gr</a><br><a href="http://nitroproject.org">
http://nitroproject.org</a>