RubyMine gives a warning on any string that uses double quotes without
interpolation... So I learnt to use single quotes when no interpolation,
and double quotes only on interpolation.

I would prefer using double quotes everywhere..

Regards
Gurpreet



On 15 March 2014 11:23, tamouse pontiki <tamouse.li...@gmail.com> wrote:

> On Thu, Mar 13, 2014 at 7:01 AM, Dave Aronson
> <googlegroups2d...@davearonson.com> wrote:
> > On Thu, Mar 13, 2014 at 12:52 AM, Brandon <wongw...@gmail.com> wrote:
> >
> >> I try to use single quote first as much as I can because I find the
> >> readability is better and it takes up less spaces each line.
> >
> > I've started doing the opposite.  The tiny time savings in the
> > interpreter from not checking for interpolation, pale in comparison to
> > the human-time wasted by "why is it failing to do the interpolation I
> > added, oh, I didn't convert the quotes" and "why is it blowing up on
> > this perfectly innocent string, oh, I used a contraction inside
> > single-quotes so it thinks the string ends there" and whatever other
> > problems it causes.
>
> I can get behind this. My fingers tend to land on single quotes for
> certain things I have *never* used interpolation on, such as require
> names. Not that one couldn't, I just haven't (yet). I struggled with
> watching a senior dev experience this very thing and not feeling I
> should say anything to them. I finally decided I should.
>
> > Meanwhile, though, I'm curious.  Can you articulate why you feel
> > single-quotes have better readability?
>
> I'm actually now thinking that the double quote marks out a string
> more easily visually, and so probably makes it more valuable for that.
> But not much.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-talk+unsubscr...@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/CAHUC_t8t6DKkpwTvkTgqttVos8Ji6%3DOTWENatM_56cXu4Sc2NA%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAHKR60yKeVwfvRTWdLrg64qA5EUTocAG%3Dsno496Gz5AG9CA2pQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to