You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Understanding pattern matching will boost code quality for functional languages, as well as effectively utilize one of the most popular string processing language RegEx.
Key Points
What is pattern matching?
Pattern matching is simply the matching of constructs to a specific pattern.
# fib(1) matches this clausedeffib(1),do: 1# fib(2) matches this clausedeffib(2),do: 1# everything else matches this clausedeffib(n),do: fib(n-1)+fib(n-2)
Use cases
As above, understanding pattern matching allows developers to create more concise code. We can also use pattern matching to destructure constructs.
%{name: name}=%{name: "AwesomeName",age: "18"}# name is now bound to "AwesoneName"
RegEx also utilizes pattern matching to search for patterns in a String.
Pitfalls
Pattern matching constructs are mainly used in functional languages such as Elixir, Haskell.
Pattern matching in RegEx can become extremely complex.
Impact
Consider using functional languages to develop algorithms, create functional code.
Understanding pattern matching can also boost productivity in RegEx.
The text was updated successfully, but these errors were encountered:
Link to the slides
WIIFY
Understanding pattern matching will boost code quality for functional languages, as well as effectively utilize one of the most popular string processing language RegEx.
Key Points
What is pattern matching?
Pattern matching is simply the matching of constructs to a specific pattern.
Use cases
As above, understanding pattern matching allows developers to create more concise code. We can also use pattern matching to destructure constructs.
RegEx also utilizes pattern matching to search for patterns in a String.
Pitfalls
Pattern matching constructs are mainly used in functional languages such as Elixir, Haskell.
Pattern matching in RegEx can become extremely complex.
Impact
Consider using functional languages to develop algorithms, create functional code.
Understanding pattern matching can also boost productivity in RegEx.
The text was updated successfully, but these errors were encountered: