I'm thinking that, given that the essence of this (thinobject) thing is in following class-specific search paths for executables (methods), it may be rather easy to implement in the shell. For now I'm using the tob shell script as an explicit wrapper, but maybe it would be possible to run that as some sort of bash extension...
Regarding thinobject-as-search-path, the following should then work:
$ myob.doit args ...
This would turn right around and do:
$ doit myob args ...
Is this useful on its own, i.e., in other situations not directly linked to the thinobject scheme? Maybe... But thinobject *does* go further: it assumes a certain amount of setup within the method, e.g., traversing the search path to read default or explicit properties.
That initial processing step might well be implemented in a "setup handler", invoked as a first processing step in a nascient method. Using the bash shell, for example, this code would set various environment variables to reflect the object state.
Note that, if there were native support for this scheme, this sort of thing could be done:
$ for ob in me you him her; do $ob.show-name; done
or
$ somepath/{me,you,his,her}.show-name
utilitizing other features of the shell.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm thinking that, given that the essence of this (thinobject) thing is in following class-specific search paths for executables (methods), it may be rather easy to implement in the shell. For now I'm using the tob shell script as an explicit wrapper, but maybe it would be possible to run that as some sort of bash extension...
Regarding thinobject-as-search-path, the following should then work:
$ myob.doit args ...
This would turn right around and do:
$ doit myob args ...
Is this useful on its own, i.e., in other situations not directly linked to the thinobject scheme? Maybe... But thinobject *does* go further: it assumes a certain amount of setup within the method, e.g., traversing the search path to read default or explicit properties.
That initial processing step might well be implemented in a "setup handler", invoked as a first processing step in a nascient method. Using the bash shell, for example, this code would set various environment variables to reflect the object state.
Note that, if there were native support for this scheme, this sort of thing could be done:
$ for ob in me you him her; do $ob.show-name; done
or
$ somepath/{me,you,his,her}.show-name
utilitizing other features of the shell.