Putting quotes in wysiwyg strings

Wolven ra at wolven.net
Wed Nov 22 14:56:37 PST 2006


== Quote from renox (renaud.hebert at free.fr)'s article
> Bah, I feel that putting any fixed delimitor for string is bond to create a
> problem for some user whether it is simple, double quotes..
> Why not reuse a good idea from the shell: <<FOO .... FOO
> putting a customisable end-of-text word can avoid many problem.
> Sure this makes the parser a bit more complex, but not that much..
> So for D it would be something like:
> r <word>" ... "<word> where word is some text without space
> or r(<word>)" .... "<word>  or the same thing but with a keyword "raw" instead of r.
> Comments?
> RenoX

Well RenoX,
   I, for one, support your idea.  Years ago, I wondered why they didn't pick some
better character than a single and\or double quotes to bracket literals with.
Personally, I like the minature << and >> characters (ASCII decimal 171 and 187).
 You would still need some method of including those characters within a literal
but at least you wouldn't have the problem with single and double quotes which are
used in standard English text all the time...  :)



More information about the Digitalmars-d mailing list