Most voted "pattern-matching" questions
7 questions
Sort by count of
-
15
votes2
answers399
viewsHow does Python structural matching (match declaration) work?
Recently, the Pattern matching structural version was introduced 3.10 (still in alpha) Python. For this, the keywords match and case. Were, in the notes of release, included several examples, among…
python python-3.x characteristic-language pattern-matchingasked 3 years, 8 months ago Luiz Felipe 32,886 -
14
votes4
answers1231
viewsVery interesting switch/case on Swift - What other languages support this?
The Swift language presents a very interesting and very intuitive way to work with intervals using switch-case, with "partial matching" techniques, "Pattern-matching" etc, look at these examples:…
-
9
votes1
answer156
viewsWhat is Pattern matching in functional languages?
When reading about the functional paradigm, I realized that most languages have a common characteristic, the Pattern matching. Contextualizing for a programmer like me, accustomed to the…
-
9
votes2
answers304
viewsWhat are the differences between match and switch in PHP8?
PHP 8 looks like have already been launched, with a series of changes and new things. Among the changes, they created the expression match. I saw that she reminds a little of the old and traditional…
php characteristic-language php-8 pattern-matchingasked 3 years, 11 months ago Wallace Maxters 102,340 -
6
votes3
answers142
viewsMultiple cases on switch with C# 8
On seeing this question about multiple conditions in the switch, reminded me of a problem I had and I couldn’t solve. In C# 8, a new syntax for switch: int num = ObterUmNumero(); var descricao = num…
-
5
votes1
answer348
viewsWhat is Pattern Matching?
I’m reading about the Pattern matching and I’m still very confused about this feature because it’s something new for me. Here are some examples: {:ok, result} = {:ok, 12} {:okay, 12} and 12 = result…
-
3
votes1
answer55
viewsGuards vs functions with Pattern matching
I’m starting out in Haskell and I was doing some exercises on her Exercism. When I sent a code, I compared it with the others and came across a very similar one to mine, but I used a definition of…