3 ms·
The pipeline operator currently sits at Stage 2 as an ECMAScript proposal. Many people (including me) believe the current proposal is a harmful addition to the
by arendjr 4y ago
The pipeline operator currently sits at Stage 2 as an ECMAScript proposal. Many people (including me) believe the current proposal is a harmful addition to the language, and it would be better to not have a pipeline operator than the current Hack proposal. For this reason, I created the linked ESLint plugin.
- mdmglr 4y agoCan you give me the gist of why it would be considered harmful?
- arendjr 4y agoUnlike pipe operators in functional languages, the Hack proposal is aimed at composition of expressions instead of functions. This makes the proposal extremely pervasive and unfocused, enabling people to write `a |> %[0]` instead of `a[0]`, for instance. Proponents argue it’s great because you can pipe arbitrary expressions without nesting or needing temporary variables, but opponents argue it harms readability and will result in needless style arguments.
- mdmglr 4y agoMakes sense. Could linters solve this issue?
- deleted 4y ago[deleted]