Perl6-Math-Matrix icon indicating copy to clipboard operation
Perl6-Math-Matrix copied to clipboard

class breakup

Open lichtkind opened this issue 6 years ago • 8 comments

as the class gets bigger and bigger I plan to split the code into partial classes, but leave the namespace for most part. I think operators with get their own file first.

lichtkind avatar Mar 17 '18 16:03 lichtkind

How would you do that? role composition for specific function? like Matrix::Triangular to overwrite some behaviour? not sure to get how the split would work, but indeed, the class is getting a bit too big

pierre-vigier avatar Mar 18 '18 15:03 pierre-vigier

i spoke just about breaking it up into files. not functional subclasses. good candidates are decompositions and ops but each bring reduction of only ~100 lines, but I will do it anyway because there separate sections and also good for documentations (linkable sections). On other hand most of code is not complicated so there is not much to encapsulate. this is also one reason to put decomposition into subclass because they are more complicated so you get the abstraction effect by hiding it into another file.

Not decided - But open issue for me now.

lichtkind avatar Mar 18 '18 16:03 lichtkind

a huge step will be outsource pod into own file. this has also additional advantage that to generate the readme, we don't have to cat together several converted files. disadvantage though: pod no longer attached to methods and cant use the why metamethod but didnt figured that how to use it anyhow.

lichtkind avatar Mar 23 '18 19:03 lichtkind

all experiments with it gone nowhere so project is stalled for now

lichtkind avatar Mar 24 '18 21:03 lichtkind

I looked into it and its much harder to do than expected, think i should factor out other things first like special array and special array of array generation

lichtkind avatar Aug 26 '18 08:08 lichtkind

i could try roles

lichtkind avatar Aug 27 '18 21:08 lichtkind

started to work on issue, moved aux methods into role ::Util

lichtkind avatar Sep 13 '18 04:09 lichtkind

there will be no other distributed modules

lichtkind avatar Sep 22 '18 18:09 lichtkind