This is based on his Ruby study notes made while he studied Ruby himself,
from various online Ruby resources like tutorials, blogs and Ruby
documentation. A site I would definitely recommend for Ruby newbies.
On 10/14/06, Dibya Prakash <prakash.dibya@gmail.com> wrote:
Hi All,
This is to let you know that my good friend, Satish Talim has put together
an excellent site – Learning Ruby here – - Log In
This is based on his Ruby study notes made while he studied Ruby himself,
from various online Ruby resources like tutorials, blogs and Ruby
documentation. A site I would definitely recommend for Ruby newbies.
One quick question in one of his examples he states that using single
quotes for strings is more efficient, why is this?
···
On 10/14/06, Kevin Olemoh <darkintent@gmail.com> wrote:
Neat thanks for the heads up.
On 10/14/06, Dibya Prakash <prakash.dibya@gmail.com> wrote:
> Hi All,
>
> This is to let you know that my good friend, Satish Talim has put together
> an excellent site – Learning Ruby here –
> - Log In
>
> This is based on his Ruby study notes made while he studied Ruby himself,
> from various online Ruby resources like tutorials, blogs and Ruby
> documentation. A site I would definitely recommend for Ruby newbies.
>
> Thanks
> Dibya Prakash
>
On 10/14/06, Firman Wandayandi <firmanw@gmail.com> wrote:
Hi Dibya,
On 10/14/06, Dibya Prakash <prakash.dibya@gmail.com> wrote:
> Hi All,
>
> This is to let you know that my good friend, Satish Talim has put
together
> an excellent site – Learning Ruby here –
> - Log In
Great turtorial, It was covered what a newbie need to learn about Ruby.
Thanks for the info, also thanks to Satish for a great Ruby stuff.
I believe the theory goes that using single quotes means that there is no
interperlation required, and therefore less work for the interpereter. Thus
faster.
This was discussed here a few of weeks ago, with some benchmarks that seemed
to indicate that there
really isn't much difference between the two.
I'm not sure that the thread ended up reaching a conclusion though.
···
On 10/14/06, Kevin Olemoh <darkintent@gmail.com> wrote:
One quick question in one of his examples he states that using single
quotes for strings is more efficient, why is this?
On 10/14/06, Kevin Olemoh <darkintent@gmail.com> wrote:
>
> One quick question in one of his examples he states that using single
> quotes for strings is more efficient, why is this?
>
I believe the theory goes that using single quotes means that there is no
interperlation required, and therefore less work for the interpereter. Thus
faster.
This was discussed here a few of weeks ago, with some benchmarks that seemed
to indicate that there
really isn't much difference between the two.
I'm not sure that the thread ended up reaching a conclusion though.
Daniel N wrote:
> I'm not sure that the thread ended up reaching a conclusion though.
No, it didn't. The hypothesis was that the *parser* has a little easier time with non-interpolated strings, and the benchmarks didn't test that. They had N.times { "blah blah" } when they should have had N.times { eval '"blah blah"' }.
That said, it's hardly a reason to go for single quotes. I mean, the quintessence of premature optimization dude. /That/ said, I think the singles make less line noise.
Yes, the reason for single over double quotes isn't about performance.
Personally, I try (or at least tend) to use single quotes unless I
need something which they don't give me like interpolation and escaped
characters.
···
On 10/14/06, Devin Mullins <twifkak@comcast.net> wrote:
Daniel N wrote:
> I'm not sure that the thread ended up reaching a conclusion though.
No, it didn't. The hypothesis was that the *parser* has a little easier
time with non-interpolated strings, and the benchmarks didn't test that.
They had N.times { "blah blah" } when they should have had N.times {
eval '"blah blah"' }.
That said, it's hardly a reason to go for single quotes. I mean, the
quintessence of premature optimization dude. /That/ said, I think the
singles make less line noise.
Daniel N wrote:
> I'm not sure that the thread ended up reaching a conclusion though.
No, it didn't. The hypothesis was that the *parser* has a little easier time with non-interpolated strings, and the benchmarks didn't test that. They had N.times { "blah blah" } when they should have had N.times { eval '"blah blah"' }.
Daniel N wrote:
> I'm not sure that the thread ended up reaching a conclusion though.
No, it didn't. The hypothesis was that the *parser* has a little easier time with non-interpolated strings, and the benchmarks didn't test that. They had N.times { "blah blah" } when they should have had N.times { eval '"blah blah"' }.
That said, it's hardly a reason to go for single quotes. I mean, the quintessence of premature optimization dude. /That/ said, I think the singles make less line noise.
A common convention is to use single quotes unless there is
a reason to use double quotes. I sometimes follow that, but
frequently forget.
I find the double quotes more intuitive, but it's a microscopic
difference and probably has to do with my years of C and BASIC
(notwithstanding the years of Pascal and Fortran).
I find the double quotes more intuitive, but it's a microscopic
difference and probably has to do with my years of C and BASIC
(notwithstanding the years of Pascal and Fortran).
Seconded. Though recently, my fingers protest against my Java day job
where double-quotes are the only thing I hit Shift for. (I make heavy,
heavy abuse of autocomplete.)
I am developing a Ruby tutorial as well. I will be covering CGI
integration and database programming too. I will also try ti hit web
caching and cookies for web programmers.
Seriously? What about common operators like "+", "*", "&&", and "||"?
I don't see how autocomplete would help with those.
···
On Oct 15 2006, 12:06 pm, David Vallner <d...@vallner.net> wrote:
Seconded. Though recently, my fingers protest against my Java day job
where double-quotes are the only thing I hit Shift for. (I make heavy,
heavy abuse of autocomplete.)