> On Apr 21, 2021, at 12:57 PM, Sven Barth via fpc-devel
> wrote:
>
> You can only use global operators with objects.
yes but not with *generic* objects. I find it very hard to understand why this
is being blocked for objects. Without this there is no way to have *generic*
record
Am 21.04.2021 um 15:44 schrieb Benito van der Zander via fpc-devel:
Hi,
what about overloading operators for OBJECTs?
They do not conflict with any default operators.
I expected this to work, but it did not compile:
type generic TXQHashset = object //(specialize
TXQBaseHashmap)...
Am 21.04.2021 um 16:54 schrieb Ryan Joseph via fpc-devel:
On Apr 18, 2021, at 1:37 AM, Sven Barth wrote:
It has been decided back when operator overloads were introduced that they do
not replace existing, built in operators. This decision still stands. And we
see no reason to change that.
> On Apr 18, 2021, at 1:37 AM, Sven Barth wrote:
>
> It has been decided back when operator overloads were introduced that they do
> not replace existing, built in operators. This decision still stands. And we
> see no reason to change that. This way a user can *rely* on what a certain
>
> On Apr 21, 2021, at 7:44 AM, Benito van der Zander via fpc-devel
> wrote:
>
> Hi,
>
> what about overloading operators for OBJECTs?
>
> They do not conflict with any default operators.
>
> I expected this to work, but it did not compile:
>
>
>
> type generic TXQHashset = object
Hi,
what about overloading operators for OBJECTs?
They do not conflict with any default operators.
I expected this to work, but it did not compile:
type generic TXQHashset = object //(specialize
TXQBaseHashmap)...
class operator =(const a, b: TXQHashset): boolean;
end;
Cheers,
Ryan Joseph via fpc-devel schrieb am So.,
18. Apr. 2021, 02:18:
> Since I'm working on generics right now can we finally, at the very least,
> allow class operators for comparison operators? This is literally the only
> way for a generic class to override the = operator (along with some others)
> On Apr 17, 2021, at 2:12 PM, Jonas Maebe via fpc-devel
> wrote:
>
> The issue with allowing it for classes (generic or not) is that the the =
> operator already has a meaning for them (pointer equality). I think in
> general we don't allow overloading operators that have a built-in
On 2021-04-17 22:02, Ryan Joseph via fpc-devel wrote:
Since I'm working on generics right now can we finally, at the very
least, allow class operators for comparison operators? This is
literally the only way for a generic class to override the = operator
(along with some others) so there's no