I think this is more or less along the lines of personal preference.
I've (somewhat recently) adopted the philosophy of always using single
quotes for string literals, and only using double quotes for strings
that require variable interpolation.
This has gotten me into a bit of trouble when I switch from Ruby to C
extensions, however.
Regards,
Dan
This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly
prohibited and may be unlawful. If you have received this communication
in error, please immediately notify the sender by reply e-mail and destroy
all copies of the communication and any attachments.
···
-----Original Message-----
From: Ben Johnson [mailto:bjohnson@contuitive.com]
Sent: Thursday, July 20, 2006 12:48 PM
To: ruby-talk ML
Subject: "" vs ''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.Thanks for your help.