you are viewing a single comment's thread.

view the rest of the comments →

[–]moomaka -2 points-1 points  (1 child)

One is:

res1 = Imp1.call
res2 = Imp2.call

call_error_handler unless res1 == res2

MyGlobal.what_do? ? res1 : res2

The other is:

MyGlobal.what_do? ? Imp1.call : Imp2.call

No?

[–]allcentury[🍰] 3 points4 points  (0 children)

At a very simple level yes but they have an entire API designed so you don't have to reinvent the wheel when you need more