[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: single quotes vs. double quotes
- From: Ico <lua@...>
- Date: Mon, 12 Oct 2009 15:35:50 +0200
* On 2009-10-12 Rob Kendrick <email@example.com> wrote :
> On Mon, 12 Oct 2009 08:17:45 -0500
> Fernando P. García <firstname.lastname@example.org> wrote:
> > In most languages (not only scripting) the use of single quotes is
> > faster than double quotes, does it is applicable in Lua? perhaps for
> > the other ways define strings?
> In some languages, string interpolation happens with one style of
> quotes, but not the others. Lua does no form of string interpolation
> on literals; all three types of string delimiters are compiled to
> identical byte code; there is no performance penalty for favouring one
> over the other.
There is a difference: in double quotes escape sequences are
a = "one\ntwo"
gives a differnet result then
a = 'one\ntwo'