Operator overloading - overloading operator allows the DSL to provide a natural syntax.
运算符重载——对运算符进行重载可以使DSL可以提供一个更为自然的语法。
Operator overloading allows new data types to be created that seamlessly integrate into the language.
运算符重载允许创建与语言无缝集成的新数据类型。
In Listing 2, you can see the operator overloading I set up in Listing 1 in action.
在清单2中,可以看到我在清单1中设置的操作符重载的效果。
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.
可以看到,操作符的即时多态,或操作符重载,对于我们来说,如果小心使用和记录,会非常强大。
So there are some downsides, in my view, to doing operator overloading, but there's some real pluses.
它还可以应用于其他一些东西,因此这样做操作符重载,就会产生一些负面影响了,以我的观点来看的话。
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时曾问过他为何放弃操作符重载(我想该问题和答案还尚未公开过)。
More consistent, symmetric operator overloading.
更一致的、对称的操作符重载。
And no, contrary to what it might look like, this isn't operator-overloading.
与其外表相反,这并非操作符重载。
In this installment of Practically Groovy, I introduce you to Groovy's support for operator ad-hoc polymorphism, also known as operator overloading.
在实战groovy的这一期中,我将介绍Groovy对操作符即时多态(也称为操作符重载)的支持。
We'll learn more about operator overloading in the next chapter, but in this chapter we cover the assignment operator.
在下一章我们将进一步学习操作符重载,本章中我们先介绍赋值操作符。
Function overloading and operator overloading are two such fluffy things - there are many OO languages that don't support those 2 features.
函数重载和运算符重载的两种松软的东西——有许多面向对象的语言不支持这2种特征。
If your programming language supports operator overloading, you should also provide an implementation of the equality and inequality operators.
如果编程语言支持运算符重载,则还应提供等号和不等号运算符的实现。
Operator overloading does not work for some stuff, works for others... linker error lnk2019.
操作符重载不工作对一些东西,为别人工作…链接器错误LNK2019。
OK, in each case, what these things are doing, is they're doing, what sometimes gets referred to as operator overloading.
这将会是个默认的或者说是,通用的来比较对象是否相同的方法,好,在每个例子中,这些事情正在做的,就是,一些与操作符重载有关的东西。
Discusses changes to operator overloading.
讨论运算符重载的更改。
On all compound assignment operators, overloading the binary operator implicitly overloads the equivalent compound assignment.
在所有复合指派运算子上,多载二元运算子即隐含多载对等的复合指派。
Operator overloading that works well with generics and built-in primitive types.
运算子多载,适用于泛型及内建基本型别。
The reason I say that is, by having operator overloading I can use 1 generic interface to all of the objects that I want to use.
他在大多数情况下都是对的,我要这么说的原因是,通过运算符重载我可以,用一个通用的借口对。
The reason I say that is, by having operator overloading I can use 1 generic interface to all of the objects that I want to use.
他在大多数情况下都是对的,我要这么说的原因是,通过运算符重载我可以,用一个通用的借口对。
应用推荐