Friday, December 14, 2018

Class methods in Hardly

Methods are amacro attached to the class object, the class objectis a stack, all stacks get a symbol.

S we get variable scoping:

arg3 arg2 arg1 mymethod myclass

Any definition from myclass comes  prefixed y class name.

myclass is a macro that always get one of the methods from its definition. All stacks have a macro definition for immediate look up of local methods. Definition lookup is extremely fast as all names are eight byte limited. So separating by slack class allows reuse without conflict. The execution unit does almost everything by macro defines as they are the shortest path.

No comments: