zverok (Victor Shepelev) wrote in #note-21: > > `+@` seems very rarely useful > ... The overarching context for this ticket is chainable aliases. As syntactic dressing for a literal, yes there is value in the existing method names. And...phluid61 (Matthew Kerwin)
Apologies for posting to a closed ticket, but here's a thought in case it helps someone propose something else in future: partial application in `#to_proc`, e.g. `games.map(&(:[], :steam_id))` I hate the syntax I just invented, but the ...phluid61 (Matthew Kerwin)
chrisseaton (Chris Seaton) wrote in #note-3: > `#fetch_or_set` could be a good name. > ... I can see the utilitiy, it would be good if it had a similar signature to #fetch : ```ruby hsh = {} hsh.fetch_or_set(:a, 1) # => 1, hsh = {...phluid61 (Matthew Kerwin)
jez (Jake Zimmerman) wrote in #note-16: > A colleague pointed out that `or_else` has the nice property that it could replace the `||=` for default initializing instance variables: > ... Except that `@foo ||= x` is `@foo || (@foo = x)`,...phluid61 (Matthew Kerwin)
benlangfeld (Ben Langfeld) wrote in #note-4: > > ... Minor point, I don't think it affects much, but RFC 3484 is obsolete and is replaced by RFC 6724 https://tools.ietf.org/html/rfc6724 Cheersphluid61 (Matthew Kerwin)
It's not valid according to RFC 3986 (the URI standard) but that is pretty old now. I suspect switching from the IETF URI spec to the WHATWG URL spec would have other consequences, too. phluid61 (Matthew Kerwin)
For what it's worth, I'm not *against* `#dedup` per se. `-@` is great for signalling a frozen literal, but in the context at hand the method is more likely to be used to deduplicate a derived value. What about adding a parameter to a...phluid61 (Matthew Kerwin)
alanwu (Alan Wu) wrote: > I like `dedup` too. `-@` was introduced to expose deduplication in the first place. #11782 : > ... The optimisations aren't part of the original specification. In fact, it was all about adding `+@`, beca...phluid61 (Matthew Kerwin)