News for hackers. Stuff that matters.
Re:Is C# Underhyped? by neonsunset on Friday December 08, 2023 @07:55AM (#38568444)
Switch in C# is pretty much Rust's 'match' (aside from Rust having unit type and being expression oriented which gives it an advantage). It support list pattern matching, object type and member pattern matching, inline slice patterns, etc. You don't need to use switch statements for that either, switch expressions is the recommended syntax today and IDE is likely to even suggest to auto-fix some of the idioms it can recognize.

There are no comments on this comment yet.