[elixir-core:10116] [Proposal] range pattern matching in case without when

2021-03-13 Thread Igor Silva
Current behavior case ?a do x when x in ?a..?z -> # code x when x in ?A..?Z -> # code _ -> # code end Desired behavior case ?a do ?a..?z -> # code ?A..?Z -> # code _ -> # code end #GoiásouVilaNova -- You received this message because you are subscribed to the Google Groups "elixi

Re: [elixir-core:10116] [Proposal] range pattern matching in case without when

2021-03-13 Thread Amos King
Would this match on an element in a range and on an equivalent range? ?a or ?a..?z would both match with ?a..?z The proposed code looks nice and I thought was simpler at first. Considering it further made me think of the situation above. I want the explicitness of the current behavior to reduce