ahoward wrote: > personally i would not like to see mandatory declarations as part of ruby, > though optional ones might at times be usefull : > > eg. > > # a wanna-be declaration > def foo; end > > puts foo > > def foo > 'foo' > end > > i'm no language designer by a __long__ shot, but i think this might slow the > interpreter down if this worked by default? if not, i think it would be a > nice feature... right now the only work around (to maintain readability) is > to put foo into a module and do > > require 'foo' > > puts foo > > which is o.k. most of the time, but sometimes a real _optional_ 'declaration' would be > nice too What I do: ====================================================== #some init #logic is here a=foo() #print output BEGIN { def foo #whatever end } ====================================================== That way I have the logic in the top of my script and the nitty-gritty in the bottom. -- Brigands will demand your money or your life, but a woman will demand both. Make Software - Not War.