Visitor Design Pattern Is Giving Way To Pattern Matching Expressions!

The Visitor is one of the most beautiful design patterns for its unique capability to extend a hierarchy of classes by a method that none of the hierarchy members have. Still, with the progression of functional concepts in the C# language syntax, the Visitor is also progressing - to oblivion. This video will teach you the working principle behind the Visitor design pattern and demonstrate a traditional approach to implementing and consuming it, like the one you might find in the Gang of Four book. But, as we said, the C# language is changing. It is progressing towards supporting more functional designs, and one aspect of that change is the increasing support for pattern matching, including type-test-and-set patterns. By coincidence, that is the ground of the Visitor, too! By the end of this video, you will learn how to implement Visitor-like mappings using novel C# syntax that includes type-matching patterns, switch expressions, and even the good-old extension methods. You will even see the possibility of implementing impromptu visitors using lambdas, an approach well outside the scope of traditional Visitors based on classes. Watch this video and learn why the Visitor design pattern mostly remains confined within library code today, while pattern-matching expressions tend to take the Visitor's place in business applications.

Видео Visitor Design Pattern Is Giving Way To Pattern Matching Expressions! автора Programming C#
Страницу в закладки Мои закладки ( 0 )
Все заметки Новая заметка Страницу в заметки