You might take a look at
http://search.cpan.org/~dconway/Class-Multimethods-1.70/ which does a
perl-level implementation of multimethods. Does this resolve these
overload issues? (For what it is worth, the C Object System, COS, support
multimethod resolution and so using it for PDL::NextGen might avoid or
mitigate this problem...)
--Chris
On Tue, Oct 25, 2016 at 10:30 AM, Chris Marshall <devel.chm...@gmail.com>
wrote:
> On re-reading, I think the problem we're really discussing here is
> the operator overloading and the difficulty seems to be because the
> overload resolution doesn't handle selection between two classes.
>
> It is this that "forces" the result to be PDL or MyPDL. I'm not sure
> a real solution is possible save implementing overload using multi-methods.
>
> --Chris
>
>
> On Mon, Oct 24, 2016 at 1:30 PM, Chris Marshall <devel.chm...@gmail.com>
> wrote:
>
>> Thanks for the additional clarification for context---what a mess!
>>
>> From your example, it seems that the current PDL approach for OO via
>> "has-a" doesn't work but my question is what method would work? Is there
>> an example of an OO language or framework that can be shown to work for
>> this type of problem? Is the problem with PDL, perl5, both, neither?
>>
>> --Chris
>>
>>
>> On Mon, Oct 24, 2016 at 12:51 PM, Diab Jerius <djer...@cfa.harvard.edu>
>> wrote:
>>
>>> On Mon, Oct 24, 2016 at 12:43 PM, Diab Jerius <djer...@cfa.harvard.edu>
>>> wrote:
>>> > initialize() currently must assume that object construction can be
>>> > done without any arguments to the constructor. That's inappropriate
>>> > in some instances (as described above).
>>>
>>> And once more, to clarify...
>>>
>>> initialize() is not passed any context, so must assume that object
>>> attributes have defaults which are context independent. This is not
>>> always appropriate.
>>>
>>
>>
>
------------------------------------------------------------------------------
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive.
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
_______________________________________________
pdl-devel mailing list
pdl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-devel