3 ms·
Oh come the fuck on. At least to anyone who's written a C program, using "s" for a string argument is absolutely clear. Read the man pages for pretty much every
by jff 13y ago
Oh come the fuck on. At least to anyone who's written a C program, using "s" for a string argument is absolutely clear. Read the man pages for pretty much every goddamn string function in the standard library; strlen, strcmp, whatever, they call name them either "s" or "s1", "s2" if there are multiple strings.
Maybe we should do strlen(const char* theStringThatIsBeingMeasured), that's a lot clearer. Maybe we should expand char to character, and strlen to stringlength, because it might not be clear enough.
- bsg75 13y agostringlength may not be clear enough. Need some underscores in there to separate the terms, maybe a prefix to indicate the type, and a url to the parameter documentation.
- pkinsky 13y agoDon't bring underscores into this, underscores scan quicker and are aesthetically pleasing! http://ieeexplore.ieee.org/xpl/articleDetails.jsp?tp=&arnumber=5521745 http://ieeexplore.ieee.org/xpl/articleDetails.jsp?tp=&arnumb...
- evilduck 13y agoWhy are you guys stuck on 's' definitely being a string? It could just as easily be a struct or anything else imaginable, in which case, you're back to not knowing anything about it from the name 's' without going to look it up. You can contrive simple examples about basic data types all you want, the simple cases and built in types are precisely where it's not a problem. Go read the src for Go's Unicode package as an example, you get 60 line methods with stuff like 't1' used all over the place and the value of t1 is assigned pages away from where it's actually used.
- asdasf 13y ago>Why are you guys stuck on 's' definitely being a string? Because that is the example I used. >It could just as easily be a struct or anything else imaginable, in which case, you're back to not knowing anything about it from the name 's' without going to look it up. If there were more information that could be conveyed, then it wouldn't be named "s". That is the entire point.