5

In chat, @cgnieder 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?
Sean Allred
  • 27,421
  • 1
    You seem to be thinking in object oriented terms for general programming: that's really not what xtemplate is about. Note that we (the team) feel that there are still big issues to solve with what xtemplate is for. – Joseph Wright Aug 18 '13 at 15:52
  • I guess I'll try to answer if Frank doesn't (I'm no OO expert), but I wonder if this is a better fit for LaTeX-L – Joseph Wright Aug 18 '13 at 15:53
  • @JosephWright I hope to have some time in the coming weeks collecting some thoughts about this. I suspect that it might make sense to mix LDB ideas with xtemplate and object-orientation, but I will need a bit of time. – Bruno Le Floch Sep 06 '13 at 16:50
  • Hey Sean, are there any news on that matter? Did you follow any team discussions? The question popped up as unanswered, but it is quite interesting. – Johannes_B Jul 04 '15 at 20:50
  • @Johannes_B I was actually looking over this again browsing the LaTeX-L archives – no real resolution, but the prototype branch of the linked repo is actually coming together quite nicely :) – Sean Allred Jul 04 '15 at 21:00
  • You could remove the template tag, it is not really suited. That will push it back on top and into the awareness of the team members around ;-) – Johannes_B Jul 04 '15 at 21:02
  • Note: the team are having a physical meeting at TUG2015 and template-related stuff will be on the list of topics to talk about. – Joseph Wright Jul 04 '15 at 21:07
  • LaTeX-L conversation: http://listserv.uni-heidelberg.de/cgi-bin/wa?A2=latex-l;eac9f4d.1408 – Sean Allred Jul 07 '15 at 03:02

0 Answers0