News for hackers. Stuff that matters.
Re:Ruby's Creed by ben-schaaf on Wednesday April 03, 2019 @04:21AM (#19561711)
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 }
Re:Ruby's Creed by majewsky on Wednesday April 03, 2019 @07:18AM (#19562433)
The last one looks a lot like Haskell:

  map (* 3) numbers
Re:Ruby's Creed by irishsultan on Wednesday April 03, 2019 @09:06AM (#19562958)
The reason for the limitation is that it was existing syntax, with a different purpose (see the sibling post to yours).