3 ms·
It is possible to add that, one of of the core developers has done that as an extension, with one limitation, not possible for a mutable api. https://github.co
by tored 5y ago
It is possible to add that, one of of the core developers has done that as an extension, with one limitation, not possible for a mutable api.
https://github.com/nikic/scalar_objects https://github.com/nikic/scalar_objects
However scalar methods also creates a bigger discussion around the existing standard library, should functions be duplicated? Etc.
Better in my opinion, because the standard library is mostly functions in the global namespace is to add pipe operator, it has been voted on but not passed yet due to some limitation.
Pipe operator is more flexible because you can use your own functions when chaining.
And then of course there are libraries that does this, which is similar to how Java does it, compare float vs Float.