6 ms·
Honestly, that just seems like a case that would just as well be solved by better naming. Get a linter, tell it to forbid one letter names, and then enforce nam
by yxhuvud 10mo ago
Honestly, that just seems like a case that would just as well be solved by better naming. Get a linter, tell it to forbid one letter names, and then enforce naming that isn't idiotic when doing pull requests.
But yes, there are multiple ways to solve communication problems.
- atomicnumber3 10mo agoYou get dangerously into the "wart" territory from C++. Another example - in ruby. I really like the Pathname library and use it a lot. Even in my OWN programs, where I almost ALWAYS immediately turn a path into a Pathname, I still find myself calling Pathname functions and getting errors because the type is a string. I've found myself naming parameters - lets say it's a data file - "data_pn" to reassure myself that i should indeed pass in a pathname and not a string. This is just re-engaging the hungarian notation "warts" pattern in another place and time.