nimpylib icon indicating copy to clipboard operation
nimpylib copied to clipboard

Magic methods syntax

Open Udiknedormin opened this issue 6 years ago • 0 comments

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

Udiknedormin avatar Aug 27 '17 15:08 Udiknedormin