3 ms·
>'s' has no meaning by itself That is exactly the point. It is just a string. That is the entire context of the variable, there is no more insight to be gain
by asdasf 13y ago
>'s' has no meaning by itself
That is exactly the point. It is just a string. That is the entire context of the variable, there is no more insight to be gained. The more generic a function is, the more generic the argument is, and thus the less context exists to be put in the name. Naming it "thisIsAStringJustSoYouKnowTwiceThatItIsAStringLikeTheTypeAlreadyToldYou" instead of "s" does not provide any benefit.
>I've rarely seen any code that would use 's' appropriately in a 4 line method that wouldn't hesitate to use it everywhere else inappropriately.
You should read more code. Both go and haskell have tons of examples, as this is standard practice in those languages.
- deleted 13y ago[deleted]