Re: ACTION 614-12: Smart Quotes

It does look a lot cleaner and less cluttered to me that the version with dollar signs, and less likely to cause confusion.

With the dollar sign, I worry that people will get very confused about the distinction between ${name} and {$name}.

Michael Kay
Saxonica

> On 10 Sep 2015, at 21:52, Robie, Jonathan <jonathan.robie@emc.com> wrote:
> 
> My previous modification to Liam's proposal had some characters messed up.  Here it is again, this time I didn't try to compose it in Outlook ....
> 
> Suppose we did this:
> 
> ExtStringConstructor ::= "~~|" ExtStringText "|~~"
> ExtStringText := ((Char* - "~~{") | "~~{" Expr "}~~")*
> 
> That makes our earlier example look like this:
> 
> ~~| ~~{ "${" }~~ |~~
> 
> Here is a longer example, modified from Liam's proposal:
> 
>    declare variable $json := ~~| {"menu": {
>      "id": "file",
>      "value": "File",
>      "popup": {
>        "menuitem": [
>          {"value": "New", "onclick": "CreateNewDoc()"},
>          {"value": "Open", "onclick": "OpenDoc()"},
>          {"value": "Close", "onclick": "CloseDoc()"},
>          {"callback": null },
>          {"session-id":  ~~{ get-session-id() }~~ }
>        ]
>      }
>    }} |~~ ;
> 
> Since you can embed any arbitrary expression, you can effectively do an escape by assigning a sequence to a string variable.
> 
> declare variable $double-squiggle := "~~";
> declare variable $pipe := "|";
> 
> ~~| ~~{ $double-squiggle, $pipe }~~ |~~
> 
> Do we need an escape mechanism beyond that?
> 
> Jonathan
> 

Received on Thursday, 10 September 2015 22:57:13 UTC