[#100309] How to use backport custom field — Jun Aruga <jaruga@...>
Please allow my ignorance.
9 messages
2020/10/06
[#100310] Re: How to use backport custom field
— "NARUSE, Yui" <naruse@...>
2020/10/06
"Backport custom field" is only available for tickets whose tracker is "Bug".
[#100311] Re: How to use backport custom field
— Jun Aruga <jaruga@...>
2020/10/06
On Tue, Oct 6, 2020 at 4:44 PM NARUSE, Yui <naruse@airemix.jp> wrote:
[#100314] Re: How to use backport custom field
— "NARUSE, Yui" <naruse@...>
2020/10/06
Thank you for confirmation.
[#100322] Re: How to use backport custom field
— Jun Aruga <jaruga@...>
2020/10/07
On Tue, Oct 6, 2020 at 7:25 PM NARUSE, Yui <naruse@airemix.jp> wrote:
[#100326] Re: How to use backport custom field
— "NARUSE, Yui" <naruse@...>
2020/10/07
I added you to "Reporter" role in the project
[#100327] Re: How to use backport custom field
— Jun Aruga <jaruga@...>
2020/10/07
On Wed, Oct 7, 2020 at 1:42 PM NARUSE, Yui <naruse@airemix.jp> wrote:
[#100358] [BUG] ruby 2.6.6 warning with encdb.so — shiftag <shiftag@...>
Hello,
1 message
2020/10/10
[ruby-core:100648] [Ruby master Feature#16670] Reverse order of `expression` in `pattern` for 1-line pattern matching while it's still experimental
From:
ttilberg@...
Date:
2020-10-29 16:23:21 UTC
List:
ruby-core #100648
Issue #16670 has been updated by ttilberg (Tim Tilberg).
There were notes in the recent dev meeting that affect this issue: https://github.com/ruby/dev-meeting-log/blob/master/DevelopersMeeting20201026Japan.md#feature-17260-promote-pattern-matching-to-official-feature-ktsj
`=>` is a new feature to support right hand assignment to allow things like `do_stuff.then{|things| make_things things } => hotdogs`.
1-line pattern matching is currently `"expression" in pattern`. Being very similar to right-hand assignment, it seems that `=>` will now act as 1-line pattern matching, removing `expr in pattern`. I find this attractive, as it reduces the number of concepts being added, and makes the 1-line matching more intuitive. It removes the interpretation of the word `in`, and shares the existing notions of rescue HotDogError => e and {this => that}.
Given this new direction, this issue can be closed.
Discussion:
- https://github.com/ruby/dev-meeting-log/blob/master/DevelopersMeeting20201026Japan.md#feature-17260-promote-pattern-matching-to-official-feature-ktsj
- https://bugs.ruby-lang.org/issues/17260
----------------------------------------
Feature #16670: Reverse order of `expression` in `pattern` for 1-line pattern matching while it's still experimental
https://bugs.ruby-lang.org/issues/16670#change-88286
* Author: ttilberg (Tim Tilberg)
* Status: Open
* Priority: Normal
----------------------------------------
Currently the 1-line syntax for pattern matching is:
```
# Usage: <expression> in <pattern>
expression = {
pattern: "Example"
}
expression in {pattern: something}
# something => "Example"
```
Is it technically possible, and desirable to switch the order of this syntax to:
```
# Usage: <pattern> in <expression>
expression = {
pattern: "Example"
}
{pattern: something} in expression
# something => "Example"
```
?
Here are my reasons:
- It is more intuitive in English -- we are "finding a pattern in something". Finding "something in a pattern" doesn't seem to make sense.
- Assignment is happening, and this keeps assignment on the left side of the operator which feels more natural.
- It matches existing behavior with the workings of the case statement:
Understanding that a `case` block evaluates each `when` expression using `when_expression === case_expression` makes more consistency with `when_pattern in case_pattern` using the new operator.
```
case something
when /pattern/
end
# is equivalent to
/pattern/ === something
# This creates more parity with
case something
in {pattern: x}
# would be equivalent to
{pattern: x} in something
```
Please see the following discussion on Reddit: https://www.reddit.com/r/ruby/comments/favshb/27s_pattern_matching_official_docs_recently_merged/fj2c7ng/
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>