Hacker News new | past | comments | ask | show | jobs | submit login

my favorite thing about camelCase is that class instances are (typically) named and cased as the inverse of their pascal-cased class.

val somethingRepository = SomethingRepository()

Is much more visually satisfying and balanced to me than:

something_repository = SomethingRepository()




I like the latter much more. I can come up with rationalizations, like my eyes having to travel to the beginning of the long identifiers if I want to tell instance and class apart in the first example but not in the second.

But honestly it’s most likely because I was socialized on Python. Feeling lucky personally that Rust follows the same convention.




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

Search: