# [email protected] / 2013-08-09 14:18:49 +0200: > 1. 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: [email protected] To contact the owner, e-mail: [email protected]
