>>First, this explicit code is likely wrong, and in fact Linus adds that “maybe you need to add a cast”.
When you write explicit code you know what types the a and be are in the context.
You don't write generic code but explicit specific code for that context. In some contexts you will need a cast and in some others you won't (hence "maybe").
The rest of the article reads like a parody. Instead of a clear, explicit one-liner the author arrives at a multiline function which still doesn't solve the main issue Linus pointed out (that you don't know which argument is high and which is low when you read the code and encounter that function).
> 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.
You 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.
When you write explicit code you know what types the a and be are in the context.
You don't write generic code but explicit specific code for that context. In some contexts you will need a cast and in some others you won't (hence "maybe").
The rest of the article reads like a parody. Instead of a clear, explicit one-liner the author arrives at a multiline function which still doesn't solve the main issue Linus pointed out (that you don't know which argument is high and which is low when you read the code and encounter that function).