@@ -122,11 +122,11 @@ Without going into more details on this, even if we were to comment on parts of
122
122
the aggregation pipeline to explain what it does, there will still be a high
123
123
cognitive load when going through the aggregation pipeline. One reason for this
124
124
is that the only way to express the aggregation framework domain-specific
125
- language (DSL) is through untyped arrays, and any PHP editor can't provide much
125
+ language (DSL) is through untyped arrays, for which a PHP editor provides little
126
126
help beyond syntax highlighting. Pair that with a few levels of nesting, and
127
127
you've got yourself the kind of code that you can write, but not read. We could
128
128
start off by refactoring the code, but instead let's try to move away from array
129
- structures and use a better solution.
129
+ structures and towards a better solution.
130
130
131
131
## Introducing the Aggregation Pipeline Builder
132
132
@@ -743,9 +743,9 @@ function _match(...) {}
743
743
function _switch(...) {}
744
744
```
745
745
746
- We also decided against this option, partly because the underscore marks (or at
747
- least used to mark) private functions or methods , but also because the
748
- underscore would break alphabetical sorting in code completion.
746
+ We also decided against this option, partly because underscores have
747
+ historically been used to mark private methods and properties , but also
748
+ because the underscore would break alphabetical sorting in code completion.
749
749
750
750
A less-than-serious approach was to use emojis, which I learned was valid in
751
751
PHP:
@@ -789,7 +789,7 @@ $group(
789
789
);
790
790
```
791
791
792
- Again, PHP's use of ` $ ` to mark variables plays nice with aggregation pipeline
792
+ Again, PHP's use of ` $ ` to mark variables plays nice with the aggregation framework
793
793
using it for stages and operators. We have considered adding a method to each
794
794
factory class that would return an array of closures to make this easier:
795
795
@@ -800,5 +800,5 @@ factory class that would return an array of closures to make this easier:
800
800
extract(Accumulator::accumulators());
801
801
```
802
802
803
- We have not implemented this for now, but if you prefer this syntax to static
803
+ We have decided not implemented this for now, but if you prefer this syntax to static
804
804
methods, or if you have alternative suggestions, please let us know about them!
0 commit comments