Are there any plans to implement operator overloading in Vala?
I will find them really useful because it is a really nice addition feature
for the language. Using it will allow us to wrap all the arithmetic access
to use APIs like GMP for big number operations.
Bignum b = new Bignum(3); //
On Sun, 2009-03-22 at 15:27 +, pancake wrote:
Are there any plans to implement operator overloading in Vala?
I will find them really useful because it is a really nice addition feature
for the language. Using it will allow us to wrap all the arithmetic access
to use APIs like GMP for
Yu Feng wrote:
On Sun, 2009-03-22 at 15:27 +, pancake wrote:
Are there any plans to implement operator overloading in Vala?
We can also use the operator overloading to wrap access to optimize
paralelized operations to be done in a while by using external APIs
like OpemMPI or any liboil
This implementation seems to pass the tests but is still far from being
perfect. Bug 523546 however would solved not-so-nice direct_compare
element (if it is moved outside the class it does not compile on
C-level).
From 5a58c3dd444bda3d11750b03159f9b5c7f85c827 Mon Sep 17 00:00:00 2001
From:
Java does not support operator overloading.
Python does:
class Complex:
def __init__(self, x, y):
self.x = x
self.y = y
def __add__(self, other):
return Complex(self.x + other.x, self.y + other.y)
Even though Python already has complex numbers build into the