Comment

Comment by pronlover723

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... ?

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton