MaxLap (Maxime Lapointe) wrote in #note-7: > @nobu: I'd say it's both syntax sugar and an operator, just like `&.`. Seems like pure syntax sugar. That's not to say it's not a good idea. It's difficult to say if the added convenien...marcandre (Marc-Andre Lafortune)
FWIW, Elixir actually supports it, but I don't recall seeing it used in the wild ``` elixir map = %{mentor_name: "Joe"} value = "Joe" key = :mentor_name match?(%{^key => ^value}, map) # => true ``` OTOH, Elixir does not support `[*, ^...marcandre (Marc-Andre Lafortune)
Note that this is a duplicate of https://bugs.ruby-lang.org/issues/15330, which includes some real world usage stats. Making it strict seems like a good idea too.marcandre (Marc-Andre Lafortune)
jeremyevans0 (Jeremy Evans) wrote in #note-5: > > A correct algorithm seem to be to rely on `Rational#floor`: > ... My bad 🤦♂️ Rational#floor makes sense for rationals, but is not what we can use. Not sure how I got confused. > I t...marcandre (Marc-Andre Lafortune)
jeremyevans0 (Jeremy Evans) wrote in #note-3: > This issue also goes the other direction: > ... Well, that `f` *is* the same float (291.4), I don't understand your point, sorry. > marcandre (Marc-Andre Lafortune) wrote: > ... Maybe...marcandre (Marc-Andre Lafortune)
@mame is correct that #15409 was a concern, but this is mainly due to #12136 and listed in the release notes for 3.0. Basically we have prioritized correctness over performance and came back to a solution similar to that of Ruby 2.2. ...marcandre (Marc-Andre Lafortune)