mutant icon indicating copy to clipboard operation
mutant copied to clipboard

notes on mutant use

Open dominictarr opened this issue 7 years ago • 4 comments

mutant modules actually used in in mutant apps:

loopdrop:

      9 mutant/array
     91 mutant/computed
      1 mutant/concat
     10 mutant/dict
      2 mutant/for
      4 mutant/html
      1 mutant/idle
      1 mutant/is
      2 mutant/keys
      9 mutant/lookup
     16 mutant/map
      2 mutant/mapped
      4 mutant/merge
      3 mutant/once
      1 mutant/proxy
     19 mutant/resolve
     21 mutant/send
      1 mutant/set
     35 mutant/struct
      1 mutant/throttle
     49 mutant/value
     54 mutant/watch
     19 mutant/when

patchcore

      5 mutant/computed
      1 mutant/dict
     18 mutant/h
      1 mutant/map
      3 mutant/once
      1 mutant/resolve
      2 mutant/throttle
      7 mutant/value
      1 mutant/watch
      1 mutant/when

patchwork

      1 mutant/array
      8 mutant/computed
     12 mutant/h
      2 mutant/map
      3 mutant/once
      1 mutant/resolve
      1 mutant/send
      1 mutant/svg
      1 mutant/throttle
      6 mutant/value
      4 mutant/watch
      4 mutant/when

Of course, this is missing es6 {foo} = require('foo') style imports but between greppability and browserifyability are two good reasons to not use those right?

Anyway, it appears that mutant has a lot of features that arn't actually in use, if the undocumented, unused features where removed then what remains would be a tighter core of (battle) tested code, and documenting it would be more feasible.

Worth noting that computed is like the number one, by a considerable margin, even if you don't count all the things which are just implemented in terms of computed anyway!

dominictarr avatar Jun 19 '17 22:06 dominictarr

also @ahdinosaur @mixmix @pietgeursen

dominictarr avatar Jun 19 '17 22:06 dominictarr

@dominictarr

Anyway, it appears that mutant has a lot of features that arn't actually in use, if the undocumented, unused features where removed then what remains would be a tighter core of (battle) tested code, and documenting it would be more feasible.

proxy-collection is the only mutant function not being used in Loop Drop.

Or do you mean we should remove ones that aren't used very frequently (one-offs)?

mmckegg avatar Jun 20 '17 00:06 mmckegg

It could be cool to extract out some of the less used modules (like mapped-dict, mapped-array) into a seperate package kind of like how pull-stream does it.

mmckegg avatar Jun 20 '17 00:06 mmckegg

yeah, at some point we moved the more complex and less used functions out of pull-stream and bumped the major (after doing this kind of analysis!). It's more accessible because it makes it obvious which things are worth learning.

dominictarr avatar Jun 20 '17 01:06 dominictarr