What is Nostr?
Tristan Brice Velloza Kildaire
npub16c2…xaj2
2024-04-09 20:59:19
in reply to nevent1q…nl80

Tristan Brice Velloza Kildaire on Nostr: There are some cases where I use many interfaces (in fact a lot) but a lot of the AST ...

There are some cases where I use many interfaces (in fact a lot) but a lot of the AST is sub-typing (or sub-classing) as it naturally makes sense.

A BinaryOperstor has a LHS and RHS of type Expression. BinaryOperstor itself is a kind-of Expression. Hence it can nest itself with (1*1)+(2*1).

Examples like those are prevalent through TBS syntax of T (and all languages) and hence implementation wise it just made sense to model it using OOP like that.

Open to suggestions and critique!
Author Public Key
npub16c2fsg7fp3yxte9ugd9yhcdpa68h924asv5d6pvm5nc37a3nkzmqd2xaj2