Open joshuacc opened 10 years ago
@fogus How are you feeling about dependencies between sublibraries these days? The most natural implementation of _.pluckPath
would reuse _.getPath
internally, but they belong in different sublibraries.
That's a good question that I don't have a good answer for. I do believe it's fine in theory to add cross dependencies, but if it's a single functional dependecy maybe we should avoid it. I don't have a good feel for where the crossover point occurs however.
On Saturday, August 30, 2014, Joshua Clanton notifications@github.com wrote:
@fogus https://github.com/fogus How are you feeling about dependencies between sublibraries these days? The most natural implementation of .pluckPath would reuse .getPath internally, but they belong in different sublibraries.
— Reply to this email directly or view it on GitHub https://github.com/documentcloud/underscore-contrib/issues/161#issuecomment-53957909 .
Okay. For now, I'll implement dependency-free. But I do believe that there would be a lot of advantages in consolidating everything into a single library that can share more internal code.
Would this be solved by #175 ?
@AlphaGit No. The pluckPath method would operate on an array and return a new array consisting of the values found at the given path. Basically map + getPath.
See https://github.com/jashkenas/underscore/issues/712
This is a natural extension of our existing
_.getPath
method.