nimpylib
nimpylib copied to clipboard
Magic methods syntax
__sth__
for magic can't be used due to Nim's identifier syntax rules. However, anything easy to search-replace is fine as long as it wouldn't be a proper Python identifier anyway. How about syntax that is just a liitle magic in Nim too?
class OrderedDict(object):
def `init`(self):
...
Also, modulo already uses this syntax in Nim so why not other operators, like add
, let's say?