Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

just-testing-this

JustTestingThis

Hmm. I think it only matters to me that the author picks one and stays with it. But that means that all libraries he uses has to use the same one. Which is why languages tend to prefer one over the other. e.g. Java using CaMeLcAsE

To have them mixed in one code base would be like a micro context switch.



Ah, see, you would have received an error when running this code!

It's "justTestingThis" not "JustTestingThis" if we are talking camel case.

So yeah, camel case and case sensitivity add unnecessary fragility to programming. Which is the reason I don't like the fad. You accidentally made my case.


camelCase vs PascalCasing is used to signal and separate public from private in C#, so that you always know what kind of data or function you are working with.

It's useful.


Having a convention is useful. It doesn't necessarily have to be that particular one.


Sorry to be pedantic but these are wrong examples:

just-testing-this ---> just_testing_this

JustTestingThis ---> justTestingThis

The second one is less dramatic but the first one would in most languages subtract testing and this from just.


isn't justTestingThis a variable name and JustTestingThis a class/struct name?


I think most people have enough processing bandwidth to cope with external libraries using a different convention to inhouse code.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: