Board index » delphi » Re: Delphi 7/8 Language enhancements
Rudy Velthuis (TeamB)
![]() Delphi Developer |
Re: Delphi 7/8 Language enhancements2003-12-04 01:49:55 AM delphi77 Craig Stuntz [TeamB] writes: QuoteThat would merely be a matter of the CLS. QuoteBut at least parts of operator overloading are not in the CLS at all -- 10.3 Operator Overloading 10.3.1 Unary operators 10.3.2 Binary operators 10.3.3 Conversion operators Pages 62ff of that document contain all the names. But it also says, on page 62: "CLS (framework): Shall not publicly expose overloading except as specified here. Frameworks authors should bear in mind that many programming languages, including Object-Oriented languages, do not support overloading and will expose overloaded methods or properties through mangled names. Most languages support neither operator overloading nor overloading based on return type, so op_Implicit and op_Explicit shall always be augmented with some alternative way to gain the same functionality. " I think that could be a more valid reason for the CLS not using them. But I think I have seen some instances of operator overloading in the CLS on *classes*. Just do a Member Search (F4) on "op_" in Lutz Roeder's Reflector, and you will find them on numeric classes, on String, Cursor, Version, XmlQualifiedName etc. -- Rudy Velthuis (TeamB) "This isn't right, this isn't even wrong." -- Wolfgang Pauli (1900-1958), upon reading a young physicist's paper |