2 ms·
Only programming languages that parse `|' have a pipe operator. In other cases, Node.js has .pipe() function. Other than that, if every class follows the same
by turtleyacht 2y ago
Only programming languages that parse `|' have a pipe operator.
In other cases, Node.js has .pipe() function.
Other than that, if every class follows the same interface of strings for input and output, the program could pipe internally (and itself participate externally).
Data types let us specialize from plain strings to have better guarantees (safety, performance, specification), but now they are more specific in turn.
Functional programming wise, Python could map over a collection of things, as long as the function knows how to process elements.
Other ideas: fluent interfaces, method chaining, builder design pattern.