xtemplate proposes 'objects,' but are they really objects? How can they be
extended to become 'true' objects?
In chat, @cgneider just pointed me to xtemplate after poking around my own
startup ltx3obj. In section 3, the documentation states (at the time of
writing):
An object type (sometimes just "object") is an abstract idea of a document
element that takes a fixed number of arguments corresponding to the
information from the document author that it is representing. A sectioning
object, for example, might take three inputs:
"title", "short title", and "label".
But isn't this just a data structure at that point? Wiktionary defines an
object as an instance of a class, and it defines a class as
A set of objects having the same behavior (but typically differing in
state), or a template defining such a set.
Thus, objects have state and behavior, which I clearly put forward in
ltx3obj. I find it difficult to believe that xtemplate does not have a
means of specifying behavior for a class (or object). Unfortunately, I
can't find any explicit support other than templates, which actually do
the work of defining what an object is rather than just saying it is.
Moreover, templates do not (in a way that is immediately obvious) support
methods.
So in conclusion, I have three very closely related questions:
Is there a way xtemplate can be extended to include this?
Does xtemplate already include this functionality, and is just non-obvious
about it from the outside looking in?
If not, are there any plans to officially include this functionality?
No comments:
Post a Comment