3 ms·
As a counterpoint, we decided to with underscored_names for our JS since we work with a lot of serialized Python data structures via JSON and using the same nam
by wahnfrieden 15y ago
As a counterpoint, we decided to with underscored_names for our JS since we work with a lot of serialized Python data structures via JSON and using the same naming convention on server as client means our JS doesn't have a mix of camelCase and under_scores for things received via JSON and things defined in the JS. We're not writing reusable libraries for other projects to use, and we don't use a heavy amount of 3rd party code, so it's no big deal.
- LeafStorm 15y agoYou bring up a good point. There may be times when technical constraints mean you have to go against the prevailing style -- in your case, interoperability with existing code. (I know that a lot of this works in the other direction when dealing with "foreign" API's in Python.) However, fat and co. aren't avoiding semicolons because there are technical constraints that require them to avoid them. They just seem to not like semicolons.
- quanticle 15y ago"using the same naming convention on server as client means our JS doesn't have a mix of camelCase and under_scores for things received via JSON" Couldn't that almost be viewed as a feature, rather than a bug? I mean, this way you can instantly tell if a particular variable was received from the server via JSON or was defined in the client code itself. I would consider a naming distinction like to be a benefit, rather than a harm.
- wahnfrieden 15y agoHm, how is that generally valuable to know? Maybe in certain use cases but for us that would just be noise.