3 ms·
I don't actually mind the syntax that much, `&` on a symbol just gives you a proc for calling `send` on the first argument. What bothers me is the limitations.
by ben-schaaf 8y ago
I don't actually mind the syntax that much, `&` on a symbol just gives you a proc for calling `send` on the first argument. What bothers me is the limitations. If you're going to have special case syntax to avoid having a useless first argument why not go all the way?
Something like this would have made a lot more sense imo:
users.map { .name.uppercase + '3' }
numbers.map { * 3 }
- majewsky 8y agoThe last one looks a lot like Haskell: map (* 3) numbers
- irishsultan 8y agoThe reason for the limitation is that it was existing syntax, with a different purpose (see the sibling post to yours).