October 30, 2025, 08:54:45 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Operator overloading

Started by Parker, January 15, 2006, 02:48:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Parker

I've mentioned this quite a few times already, "you can do this once operator overloading is supported."

So I really have to ask, will it be supported sometime?

Ionic Wind Support Team

Not everything C++ will be in Aurora, just as there will be many things in Aurora you can't do in C, or any other language.

It all depends on how difficult it is to code and parse something like that.  Since I haven't tried yet I can't give a definate answer.. 
Ionic Wind Support Team

Parker

From my never having written a real parser before, I couldn't say, but I would imagine it would go something like this:
- Recognize the form LITERAL op EXPRESSION
- Instead of acting based on built in types, first look up to see if that LITERAL is a class and if it contains an operator OP definition
- If it does, insert a call to the operator subroutine. Otherwise, act as the compiler normally would.

I realize I probably know nothing about it, but I'm just trying to help...