I'm all with you, you may even use HOST = :host PORT = :port instead of ConstUtils.next_value, but anybody else will tell you to use modul tests to find your errors instead of letting the interpreter find them. (Agreed, sharp knifes are better than dull ones, but even if all you need is a spoon?) cheers Simon James Britt wrote: > Question: Would using a constant be equally suitable for expressing > intention, and (possibly) less error-prone? > > # Assume ConstUtils.next_value > # ensures unique values > HOST = ConstUtils.next_value > PORT = ConstUtils.next_value > > foo1 = { > HOST => 'localhost', > PORT => 80 > } > > A downside to using symbols as constants is that this will not raise any > exceptions: > > > foo1 = { > :hots => 'localhost', > :prt => 80 > } > > But a typo in a constant will. > > > James