LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender: Mailing list for the LaTeX3 project <[log in to unmask]>
Date: Tue, 30 Jul 2013 23:51:28 +0200
Reply-To: Mailing list for the LaTeX3 project <[log in to unmask]>
MIME-Version: 1.0
Message-ID: <[log in to unmask]>
In-Reply-To: <[log in to unmask]>
Content-Type: text/plain; charset=ISO-8859-1
From: Michiel Helvensteijn <[log in to unmask]>
Parts/Attachments: text/plain (19 lines)
On Wed, Jul 24, 2013 at 12:27 AM, Bruno Le Floch <[log in to unmask]> wrote:

> While we are talking of datastructure, hence are not very far from
> objects, let me ask a question: do we want function polymorphism?  In
> other words, do we want the ability for a function to switch behavior
> depending on the type of its argument, e.g., letting us provide
> \obj_to_str:N <any object>?

Indeed! You'd have to implement this for method calls anyway (see
below). I suggest you make this optional. Do I dare suggest a
dedicated argument specifier (such as O)? :-)

I also propose that methods (get:n) are simply functions with a
polymorphic first parameter (\obj_get:On). That is to say, when
there is the one, there should always be the other.