For anybody who is interested in converting object pascal to nim, I have 
created a fork of pas2nim 
[https://github.com/AdrianV/pas2nim](https://github.com/AdrianV/pas2nim) which 
parses and converts a big amount of object pascal code:

  * class is converted to ref object
  * class, object and record can have member procedures and functions. private 
declarations are marked without "*"
  * class member procedures and functions get an extra self: T parameter
  * object and record member procedures and functions get an extra self: var T 
parameter
  * class, object and record properties are converted to templates which access 
the member var or getter, setter
  * type procedure of object is converted to {.closure.} - this is not the same 
and assignments to var of that type have to be adjusted
  * constructors and destructors are converted to normal procs with self param 
- but are not working yet - destructors have to wait until nim supports that
  * virtual procedures and functions are converted to method



many other things are not working yet like:

  * interfaces
  * array properties
  * ...



have fun

Reply via email to