Clear explanation of advanced features of the language, like properties, indexers, events and delegates, and operator overloading, all get their due, illustrated with short code excerpts.
基于1个网页-相关网页
Function overloading and operator overloading are two such fluffy things - there are many OO languages that don't support those 2 features.
函数重载和运算符重载的两种松软的东西——有许多面向对象的语言不支持这2种特征。
As you've seen, operator AD hoc polymorphism, or operator overloading to the rest of us, can be quite powerful if carefully employed and documented.
可以看到,操作符的即时多态,或操作符重载,对于我们来说,如果小心使用和记录,会非常强大。
I remember asking this Gosling in one of my interviews of him why he left out operator overloading (I don't think that question and answer ended up getting published).
我记得在采访Gosling时曾问过他为何放弃操作符重载(我想该问题和答案还尚未公开过)。
应用推荐