common code patterns

Monte Goulding monte at appisle.net
Mon Aug 14 16:44:45 EDT 2017


> On 15 Aug 2017, at 2:10 am, Richard Gaskin via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> But maybe not enough markdown to change how the human eye works. :)

Sure, my preferable end goal does not include backticks but I’ll take anything if it’s the only way I can have a string with escapes ;-)

The conclusion I came to on the bug report is we should have a goal of supporting escapes in all string forms (like JavaScript) but that we can’t do double quote yet due to backwards compatibility. That would come with open language which will have a script translation step and one of those steps can be “\” -> “\\” everywhere but format et al. For readability we would like a single quote delimited string so that it can include double quotes. If we add a single quote delimited string it can have escapes now because it’s something new. So we would have a few years of single quote delimited strings that process escape sequences and double quoted strings that don’t but eventually all would.

As far as interpolation goes I think I can live with the merge function particularly if I can pass it a string with escape sequences:

put “Hello" into tFoo
put “World” into tBar
put merge(‘[[ tFoo ]]\n[[ tBar ]]!’)

Cheers

Monte





More information about the use-livecode mailing list