I'm thinking something like this
(function numberFactory: vm
(local numberPrototype)
(local factory)
numberPrototype: newObject
(open numberPrototype
(function plus: number
result: (vm add: number to: this)
)
(function minus: number
result: (vm subtract: number from: this)
)
(function isLessThan: number
result: (vm value: this isLessThan: number)
)
)
factory: newObject
(open factory
(function numberFrom: value
value parent: numberPrototype
)
)
result: factory
)
some nice and simple brackets to make all the function calls really obvious. With just a few keywords (such as 'function' and 'open' and 'local')
After that I want to try implementing the compiler in DynamOS - which will require strings!! And that can then lead to a command line. Once we have the command line, well I think that will be enough to get moving with the C version.
No comments:
Post a Comment