Will there be methods for ADT

I am not sure if this belongs in this category but Ill still continue.

I am asking if there will be method-like things in snap like maybe _add or _div so we could have objects interact with already existing operators. so I could do this

((point (5) (6)) + (point (7) (8)))

also idk why the snapblocks arent working right now, maybe I’m typing it wrong (I do have the tags)

Reminds me of Python dunder properties such as __add__. For the time being, you can modify the primitive definitions.

Snapblocks uses BBCode tags for its wrapper syntax instead of HTML. So you type [snapblocks][/snapblocks] instead of <snapblocks></snapblocks>.

You can also type [sb][/sb] to use snapblocks.

Inline snapblocks. (the longhand is for snapblocks that take up an entire line)

you can still use [sb] for that, no? (if you make a new line for it)

Not planned, nope. Instead you can just edit whichever block you want to overload and do it yourself.

ok thanks for letting me know

Yes you can, the difference is that the longhand forces it to be on its own line.


On the actual topic. I think operator overloading is a really powerful concept, but I really don’t see how it could possibly work in snap, so just editing the blocks is probably the best way to go about it. If you think about it, it’s kind of like operator overloading friend functions in c++.