![]() In this article, we'll look at the new syntax to show you how it enablesreadable, concise code. These new extensions combine testinga value and extracting that information. The new syntax elements are extensions to statements you're alreadyfamiliar with: is and switch. Then,when those statements match, you extract and use information from thatvalue. You write if or switch statements that test values. You already create pattern matching algorithms using existingsyntax. Patternmatching provides more concise syntax for algorithms you already usetoday. Patterns test that a value has a certain shape, and can extractinformation from the value when it has the matching shape. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |