Tag: Design Pattern
All the articles with the tag "Design Pattern".
You Can't Remove an Anonymous Function — But Not Because It's Anonymous
A 2022 post on registering events with Action. The behavior descriptions are accurate, but the comment 'anonymous functions can't be removed' hides the reason. What blocks removal isn't anonymity — it's not holding the same instance.
The First Example Compares `pizza`, Not `type`
A 2016 write-up following Head First through the factory patterns. The concepts are textbook-correct, but all three code sections are broken — and they break the same way. Take the type as a string and there's nothing for the compiler to see.