Almost any syntax is only a small matter of programming to implement in the preprocessor.
Even [[...]]?
What concerns me is more all the other tools that has to understand it too, as I talked about in the last discussion about this.
Yes, so it's important that the syntax is as simple as possible.
It's far from easy to get into Emacs and XEmacs, for example.
Another string syntax shouldn't be impossible, or can't it handle dual character string beginnings? The multiline is of course even trickier; how is that handled in for instance sh- or perl-mode?
...
complexity of another string syntax is a drawback in itself when it
...
I'd say that at least 5% of all string literals would have to benefit
I believe that the benefits outweights the cost to the learning curve. It might even help it, if the programs you see use a lot of the characters in strings that would otherwise needed to be quoted. And many newbies to Pike are used to other scripting languages, where you can do multiline strings with a custom delimiter. I think more then one user has actually searched for it in Pike.
I have a vague memory of a pike program that did some complex scripting via a shell; the top number of backslashes in a row was 16 in those strings, that is "\\\\\\\\".
I might be biased, I write a lot of scripts that generate HTML code, or even Pike code. I'd say in bytecount 50% would be quoted using either of these methods. The actual *string* count would of course be much lower.
Given funnier regexps I will probably start using more regexps in my programs too, so the count will increase...
/ Mirar
Previous text:
2003-09-21 18:44: Subject: Re: wish: string with other quoting then \
Almost any syntax is only a small matter of programming to implement in the preprocessor. What concerns me is more all the other tools that has to understand it too, as I talked about in the last discussion about this. It's far from easy to get into Emacs and XEmacs, for example.
There's also the issue that Peter Lundqvist mentioned: The added complexity of another string syntax is a drawback in itself when it comes to learning curve. Is it really sufficiently useful to outweigh that?
I'd say that at least 5% of all string literals would have to benefit from a new syntax to motivate its existence. I only missed something like it about ten or twenty times in all the years I've used Pike. So from my point of view the drawbacks outweigh the benefits with a factor of thousand at least. But it all depends on how you typically use the language, of course. Someone that writes complicated regexps or pastes in multiline xml snippets all day long will certainly have a different perspective.
/ Martin Stjernholm, Roxen IS