Hi Sebastian, all, > Of course, but it's not always immediately obvious which type of > variable is intended to be used, and in large amounts of code it's > possible to overlook some misuses. > > Why allow the the confusion at all?
My personal take on this is to use different naming conventions for different things. Whenever I can, I use more than one word for an attribute name. I usually split those words with _, some examples are in the test code (LocalTestServer I think). But since I'm the only one who uses this convention, I've adopted the more common camelCase style for the HttpClient and HttpCore main code. My params and local variables are all lowercase, so there is little potential for mixup with attributes. I've never understood why so many people use the same naming conventions for attributes, parameters, variables, and method names. It's a bit trickier for params and local variables. Here, the simple solution is: don't do it. I can see no reason why a local variable should have the same name as a parameter of that method. Still, I'm trying to use speaking names for parameters (they appear in JavaDocs), while preferring an acronym style or single letters for variable names. I can live with a p or l prefix if disambiguation with attributes is required in the current code, but *please* without _. That would drive me mad. cheers, Roland --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
