Thoughts on naming convention

I heard a lot of voices saying that they want to make their coding style the same with the corresponding frameworks, so they study the ancestors’ codes and mimic the so called golden standards.

Keeping coding style the same with the framework is no wrong. But don’t lost your own voice when you are trying to follow other’s. 

I prefer my coding style being different from the framework that I’m using. One big advantage is that it will be much easier to distinguish which part of the codes is mine and which belongs to the API. For example, a mix of camelCase and underscore conventions:

If a new member comes to read this java snippet, he will find it useful to find the road map of this project. Sometimes I think a proper way to mix will make life easier, isn’t it?

  • 马红耀

    IDE比如eclipse很方便的就可以跟踪到方法来源,似乎意义不是很大,是吧。如果不用eclipse开发,那就另当别论了。

    • ys

      如果用eclipse时你需要阅读大量的代码呢?反复的按快捷键跳转过来跳转过去会不会很麻烦呢?
      你需要从“这做法增加了代码蕴含的信息量”这个方向来考虑。