3 ms·
> you don't know which argument is high and which is low when you read the code and encounter that function It's defined in the function parameters. Surely yo
by SquareWheel 1y ago
> you don't know which argument is high and which is low when you read the code and encounter that function
It's defined in the function parameters. Surely your IDE would let you know the correct order? Otherwise, you could make that comment about every single function you encounter.
- bluecalm 1y agoYou will not always have an IDE showing function definitions when reading diffs, greps or PR requests. Even if you do you still need to spend time to click and see the function definition and then read it. Argument names are helpful but they are not documentation so you still need a bit of time to process it. The alternative is using build in common operators in the language. >>Otherwise, you could make that comment about every single function you encounter. It's a trade-off. The more logic there is to pack the more it's worth it. Here we have a one liner with two built in operators.
- majewsky 1y agoIt's not a function, it's a macro. Just a text replacement rule without defined argument types.