3 ms·
That can go both ways? I agree that I like when functions are not special so instance.add(10) Is just sugar for add(instance, 10) and you pass anythi
by pronlover723 4y ago
That can go both ways?
I agree that I like when functions are not special so
instance.add(10)
Is just sugar for
add(instance, 10)
and you pass anything that fits as the first argument.
But, following the "syntactic sugar" is okay rule
class Foo {
add(int v);
}
Is just syntactic sugar for
void Foo.add(Foo this, int v);
... or something along those lines... ?