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 …
@TheAmazingRando what I like about && is that it puns so well with existing idioms
-
-
@wycats I agree, but this also follows nicely from the &:foo syntax: 'u && &.try(:profile) &.try(...)' -
@TheAmazingRando that's too many levels into obscure syntax for me ;) -
@wycats Fair enough. I find the `.?` to be pretty ugly, myself :)
End of conversation
New conversation -
-
-
@wycats and also extends the existing case to be more useful: 'map &.foo(arg)'Thanks. Twitter will use this to make your timeline better. UndoUndo
-
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.