You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python supports operator overriding, js does not. Perhaps there is a way to achieve this using some means. Documentation comes to mind, maybe comments, what else could potentially be used?
The text was updated successfully, but these errors were encountered:
Transcrypt marks the regions of code containing the aritmetic expressions so that the transpiler knows when to transform them so that any possible per-type override is taken into consideration.
The best thing to do though would be for the transpiler to recognize via type hints that a + b is an expression involving an intance of type A which has an __add__ method defined and automatically transpile it to a.__add__(b), but there's still much stuff to do before having that...
Python supports operator overriding, js does not. Perhaps there is a way to achieve this using some means. Documentation comes to mind, maybe comments, what else could potentially be used?
The text was updated successfully, but these errors were encountered: