# rneuhauser@suse.cz / 2013-08-09 14:18:49 +0200:
- procedural vs. object-oriented ruby
[...]
but, after perusing ops.rb, builtins.rb, and a few .rb files in yast-installation/, it seems to me that we could have a much more natural-looking ruby code if, instead of having Ops.add all over the place we went for Yast::String#+, Yast::Array#+, etc. it seems there's not so many places where we "return nil", and we could "return Yast::String.new", "return Yast::Array.new" etc in such places.
the point is: going from such Yast::String to String would be way cheaper in terms of code churn than going from String|NilClass with Builtins|Ops to String. OTOH, code that looks just like it was normal Array but which treats nils differently could be confusing, so maybe the other bullet (optimize Builtins and Ops away where possible) is more attractive? -- roman -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org