cbpporter Messages: 1401 Registered: September 2007
Ultimate Contributor
Well <<= is pretty standard for U++, and comes often in pair with ~, which does the opposite. For controls it is SetValue/GetValue. It is just one of the conventions you need to learn and what contributes to the learning curve of U++. It is the same with standard C++ and << for streams and other conventions.
The reason "=" is not used because it would be confusing. You use "=" between different types, but only if they are near identical/easily convertible. Like different representation of the same data. But an EditField is not a Value. It has a Value. This is why we use <<=, or the "kind of assign operator, but more of s take this value and use it" operator.
Until you are comfortable with this, you can avoid operator overloading in your code.
As for memory allocation failures, it is very hard to recover for them in a reliable way. It is easy if you have a malloc, but in real and complex applications with advance memory allocation it is hard. So U++ should print an error message and fail.