From: marcandre-ruby-core@... Date: 2020-10-13T16:19:24+00:00 Subject: [ruby-core:100392] [Ruby master Feature#17260] Promote pattern matching to official feature Issue #17260 has been updated by marcandre (Marc-Andre Lafortune). palkan (Vladimir Dementyev) wrote in #note-7: > I have a little concern regarding the potential changes to the current specification that we might need to introduce to improve the performance. > Recently, we introduced a [deconstructed value caching for array patterns](https://github.com/ruby/ruby/pull/3104), which broke the previous non-documented behaviour: it was possible to return different values for `#deconstruct` call within the same `case..in` statement. Now this is fixed (and the performance is improved). I'm glad to read this, I asked for [just that](https://bugs.ruby-lang.org/issues/15881) before ���� It's a perfectly valid constraint IMO. I wouldn't be worried about the fact that we aren't yet caching `#deconstruct_keys`. I can't think of a valid use case for replying different values. We can document that this constraint is projected in the future. ---------------------------------------- Feature #17260: Promote pattern matching to official feature https://bugs.ruby-lang.org/issues/17260#change-88005 * Author: ktsj (Kazuki Tsujimoto) * Status: Open * Priority: Normal * Target version: 3.0 ---------------------------------------- I propose to promote pattern matching to official feature. The current specification is basically fine, but I'd like to reconsider single line pattern matching (`expr in pat`) and suggest removing it once in 3.0. -- https://bugs.ruby-lang.org/ Unsubscribe: