kahmali / meteor-restivus

REST APIs for the Best of Us! - A Meteor 0.9+ package for building REST APIs https://atmospherejs.com/nimble/restivus
MIT License
544 stars 117 forks source link

Use consistent quotation and comment style #54

Open kahmali opened 9 years ago

kahmali commented 9 years ago
dandv commented 9 years ago

Use single quotes except in interpolated strings (should at least consider making all strings double quoted, for even more consistency)

In Perl, which also interpolates double-quoted but not single-quotes strings, I've always used single quotes whenever interpolation was not expected, and double quotes only when it was. Apostrophes in strings were pesky, which is why I preferred more format errors ("Could not read file" vs. "Couldn't read file").

kahmali commented 9 years ago

Thanks for your input @dandv! I was definitely leaning in that direction, as it's the convention I was trying to follow (but clearly failed to do so). Java is one of my most familiar languages, so I accidentally drop those double quoted strings in for no apparent reason sometimes. Just an old habit dying hard, I suppose.

I'll adopt the single-quoted-unless-interpolated convention, and probably even add in a super simple style guideline to the contributing doc and include that info there as well.