Pattern Matching for switch (preview)
GPTKB entity
Statements (55)
Predicate | Object |
---|---|
gptkbp:instance_of |
gptkb:language
|
gptkbp:bfsLayer |
4
|
gptkbp:bfsParent |
gptkb:Java_SE_19
gptkb:Java_SE_18 gptkb:Java_18 gptkb:JDK_18 |
gptkbp:allows |
more expressive code
|
gptkbp:can_be_used_with |
tuples
when clauses |
gptkbp:developed_by |
gptkb:Microsoft
|
gptkbp:enables |
deconstruction in switch cases
|
gptkbp:enhances |
switch statement
performance in certain scenarios |
gptkbp:features |
C# programming
enables concise syntax enhances code maintainability enhances switch expressions facilitates cleaner code improves developer productivity is aimed at improving code quality is evolving with new C# versions is part of modern C# development practices is subject to community feedback is used in various applications is widely discussed in developer communities reduces runtime errors reduces the need for if-else chains supports logical patterns supports nested patterns supports null checks supports pattern guards supports positional patterns supports property patterns supports relational patterns |
https://www.w3.org/2000/01/rdf-schema#label |
Pattern Matching for switch (preview)
|
gptkbp:improves |
code readability
type safety |
gptkbp:introduced |
C# 8.0
|
gptkbp:is_aimed_at |
reducing boilerplate code
|
gptkbp:is_available_in |
gptkb:Visual_Studio_2019
|
gptkbp:is_designed_to |
simplify code structure
|
gptkbp:is_documented_in |
Microsoft Docs
|
gptkbp:is_expected_to |
become a standard feature
|
gptkbp:is_influenced_by |
functional programming paradigms
|
gptkbp:is_part_of |
C# language features
C# language evolution C# 9.0 enhancements |
gptkbp:is_related_to |
pattern matching in other languages
|
gptkbp:is_supported_by |
gptkb:Roslyn_compiler
|
gptkbp:is_used_for |
pattern-based matching
|
gptkbp:is_used_in |
conditional logic
|
gptkbp:supports |
constant patterns
type patterns var patterns |
gptkbp:watch_features |
in . NET 5.0
|