Is This Lazy?
-
Is this an acceptable idiom when using Ruby, or just being lazy? Other than not "seeming" right, is there a down-side?
begin Sketchup.active_model.start_operation("Op", true) rescue ArgumentError Sketchup.active_model.start_operation("Op") end
-
There will most likely be some performance hit, but it's not likely to be significant. My personal opinion is that if it is reasonable to code the appropriate "if" conditions (like version number), you are better off doing that. For a simple issue like this, probably irrelevant; for more complex code, you'll want to be more careful.
Advertisement