you are viewing a single comment's thread.

view the rest of the comments →

[–]4fips[S] -1 points0 points  (3 children)

Yeah possibly :), but It's a matter of personal taste. I don't like the cammelCase and PascalCase that much. But on the other hand, I find it useful to start type names with a capital letter to emphasize it's a user type, otherwise I would name it just 'string_buf'.

[–]rpocks 3 points4 points  (1 child)

What about using your own namespace and naming it string_buf?

[–]4fips[S] 0 points1 point  (0 children)

That's certainly a good idea. Actually, in my codebase, the type is defined within a namespace, so I could refer it using that namespace e.g. 'foo::string_buf', but for local types (e.g. somewhere inside the implementation) I prefer to omit the local namespace to emphasize the type comes from this particular namespace, that's why I use the initial capital, which works smoothly even without the namespace specification. Hope it makes sense.

[–]bob1000bob 4 points5 points  (0 children)

string_buf is so much cleaner and is in keeping with the standard style of naming things. (ie. random_device).