4 ms·
I personally prefer using the exact oposite to the language. That way my code or customizations are set apart visually: obj.getSomethingById() <-- theirs
by rgo 14y ago
I personally prefer using the exact oposite to the language. That way my code or customizations are set apart visually:
obj.getSomethingById() <-- theirs
obj.redraw_panel() <-- mine
Non-native English speakers sometimes prefer to name variables in their native language for the same reason.
- Sandman 14y agoWhy is it important that your code is visually set apart from the rest of the language?
- RobAley 14y agoWhen someone, particularly a beginner, is reading the code and come across, say, an unfamiliar function name, then they know straight away whether to look for it in the language docs or a definition somewhere else in the code. Not essential, but handy.
- joesb 14y agoI guess that only works for really simple project. Once you bring in third party libraries, your own common library, your own multiple layers of abstraction, this naming convention means almost nothing. It pays the price of annoying programmers who are already familiar with the code for not-so useful short term benefit of the very early beginner.
- Sandman 14y agoSurely there are better ways to deal with this problem. Different languages have different solutions for this, but completely breaking the naming conventions doesn't seem like the way to go.
- joesb 14y agoEnglish is not my native language but I hate code with non-English variable names.
- thiderman 14y agoThat's a really bad thing in my eyes. Why teach a beginner that consistency is something that does not exist? Also, non-english variables are an abomination! I've worked with code with some finnish variables. Not only is it harder to grok, it's actively distracting.