[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: "" vs ''

Marcel Molina Jr.

7/20/2006 6:57:00 PM

On Fri, Jul 21, 2006 at 03:48:09AM +0900, Ben Johnson wrote:
> I know this is a very simply question, but I've seen many different
> responses.
>
> Isn't it better to use 'some string' instead of "some string".
> Because the "" goes through a lot more working interpreting any
> variable that might be in the string, etc. Where as '' is just literal.

Aesthetics aside, Ruby optomizes double quoted strings that don't have any
interpolation so the performance difference between the two is irrelevant.

marcel
--
Marcel Molina Jr. <marcel@vernix.org>