Subject: | |
From: | |
Reply To: | |
Date: | Tue, 30 Jul 2013 23:51:28 +0200 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
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
|
|
|