the collect() helper is a basic wrapper for new Collection(). because there is no logic in the helper, I believe the framework should internally only use new Collection().
I'm guessing the general sentiment will be "it's fine", and I understand the performance hit is miniscule. However, I believe the framework should avoid aliases and no-logic helpers to try and have the shortest and most performant call graph it can.
this also makes DX slightly better when navigating the framework as you don't have a middleman to click through.
There is A LOT of usage of collect() in this repo. I've included a good chunk of them in this PR, but didn't want to commit the time until a decision is made on it, but will do so if it's accepted.
the
collect()
helper is a basic wrapper fornew Collection()
. because there is no logic in the helper, I believe the framework should internally only usenew Collection()
.I'm guessing the general sentiment will be "it's fine", and I understand the performance hit is miniscule. However, I believe the framework should avoid aliases and no-logic helpers to try and have the shortest and most performant call graph it can.
this also makes DX slightly better when navigating the framework as you don't have a middleman to click through.
There is A LOT of usage of
collect()
in this repo. I've included a good chunk of them in this PR, but didn't want to commit the time until a decision is made on it, but will do so if it's accepted.