Extensions for the nim programming language.
Find a file
2015-02-06 22:12:19 +13:00
LICENSE Initial commit 2015-02-02 14:15:08 +13:00
oop_macro.nim Added oop_macro.nim. 2015-02-06 22:12:19 +13:00
README.md Update README.md 2015-02-02 14:24:30 +13:00

nim-extensions

Extensions for the nim programming language.

These extensions aim to improve the usability of nim in practical applications.

Extensions so far include:

OOP macro

usage:

class BaseObject: # inherits from RootObj
  # attributes/properties
  var
    x: int
    y: float
    
  method override_me(argx: float): int=
    result = int(argx) + self.x
    
class ClassName of BaseObject:
    method method_name(arg1: int, arg2: float=0.3): float=
      ## do stuff here
      result = arg2
      
    method override_me(argx: float): int=
      result = int(self.y) + int(argx) + self.x