- Ruby coding guidelines original source
- Ember coding guidelines original source
- ES6 coding guidelines original source
- PostgreSQL coding guidelines original source
- Elixir coding guidelines Not in this repo until we need to make changes
coding-styles's Introduction
coding-styles's People
Forkers
kculaficcoding-styles's Issues
Discussion: string style
There's one more decision to make in the ruby style guide.
This section has two options, and the style guide recommends picking one: https://github.com/ActionSprout/coding-styles/blob/master/ruby.md#consistent-string-literals
I would be happy either way. I'd even be ok with removing this section of the style guide, as I don't think we are very consistent right now anyway.
This debate has been going for quite a while. Usually the arguments are like this:
-
For single quotes:
There's a slight performance improvement, since ruby doesn't have to scan the string for possible interpolations.
-
For double quotes:
It's likely that you will end up interpolating some strings and it's annoying to change them. The performance improvement is negligible.
To be honest, I'm not very consistent about this. Sometimes I feel like following the spirit of both rules and using single quotes for things that really are not likely to be interpolated, like strings that are identifiers (which would be a good case for using a ruby symbol, but sometimes that just doesn't end up being the case), and then double quotes for strings of text like copy or whatever, which seem to have a higher likely-hood of being interpolated in the future. However, these guidelines are too subjective to be in a style-guide. Hence the idea of just removing this section and not worrying about it.
Other notes: Our javascript (es6) style-guide requires using single quotes.
Thoughts?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.