I wrote a comment suggesting an alternate syntax for the Ruby "safe navigation" operator (aka "syntax for try") https://bugs.ruby-lang.org/issues/11537#note-23 …
-
-
@wycats this one should/could actually work like u.try(:avatar).try(:large) && u.try(:avatar).try(:small) -
@nerdblogpl oh I missed what you did there. The reason it's getting complex is that it's describing something that isn't a one-liner. -
@nerdblogpl if you wrote it out in English it would be long, and therefore justifies a couple lines imo. -
@wycats I see your point, though I'm pretty sure less experienced developers will end up using such a horrible syntax anyway :) -
@nerdblogpl no way around that!
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.