LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Classic View

Use Proportional Font
Show HTML Part by Default
Show All Mail Headers

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

Print Reply
Michiel Helvensteijn <[log in to unmask]>
Tue, 30 Jul 2013 23:51:28 +0200
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.

-- 
www.mhelvens.net

ATOM RSS1 RSS2