|
|
|
|
|
by serge2k
3504 days ago
|
|
both of these are great tools, but as with many you have tradeoffs. Extension methods give you a way to produce very clean reusable code to extend behaviour of classes. Downside is you do need to bring in the extension method class (not a big deal). Java is a shitty language exactly because they don't put in things like these out of fear that people don't know how to use them. |
|
TL;DR: Java has something similar, it just came from a different view of how the problem should be solved. Both approaches have advantages and drawbacks.