Subject RE: [Firebird-Architect] Literal strings and quotes
Author Claudio Valderrama C.
> -----Original Message-----
> From: Firebird-Architect@yahoogroups.com
> [mailto:Firebird-Architect@yahoogroups.com] On Behalf Of Helen Borrie
> Sent: Domingo, 24 de Mayo de 2009 7:15
>
> At 08:41 PM 24/05/2009, Vlad Khorsun wrote:
> > What if i need this sequence inside my literal ? What if
> literal is
> >user-defined
> >and we can't prevent user from entering this sequence ?
>
> Isn't it obvious? You escape the curly with another curly,
> of course!! :-)
>
> {{ Helen }}

Until now, I have to double-escape single quotes. How many sequences would I
have to clean up? AFAIU, there are several possible sequences to mark the
beginning of a special literal string:

>> When the opening character is "[", "{", "(" or "<", the
>> closing one is
>> respectively "]", "}", ")" and ">". In other cases, the opening and
>> closing shall be identical.

Perfect for a programming nightmare.
And what if an arbitrary string matches by accident the opening character?
It probably won't have a corresponding closing character (since it was only
a coincidence) and in this case, I see the possibility of rejecting the
string as invalid or ignoring the problem by assuming it's not a escape
sequence (but not warning the user that really wanted the literal string and
forgot to terminate it properly).

> p.s. Somehow I don't quite see this getting into the standard....

I see this thing being put in the graveyard for peace for mind.

C.