This content has been marked as final. Show 4 replies
That would be kind of handy, I guess, but if you have a lot of Strings that need escaping hard coded into your application then it is probably because you are designing badly anyway, right?
And to add to that, assuming that a literal backslash represents a file separator is DEFINITELY bad design.
And to add to that, assuming that a literal backslashIt was just an example...
represents a file separator is DEFINITELY bad
Escaping is as useful when using XPaths, Regular expressions, etc...
Don't pick to the small details :) (And picking to the path seperator (I'm wide aware of the static members of class File) is really nto relevant)
I agree that most strings should be externalized (it's not a matter of design, just of good programming), but still, some strings will always stay hardcoded.
(js escaping your '<' in xmls is better???) - mostly when experimenting and writing some 'scratchbook' code.
The facility for escaping strings in C# and in Python is very useful. Moreover, adding this string escaping mechanism will be backward compatible.
Any other opinions?
Hi there,It could be handy, but personally I don't think it's a problem that needs fixing or even a situation that needs improving.
I've been programming in Java for 5 years now, and
there is one feature which will make my life alot
I'm talking about string escaping (a la c#'s
@"c:\Docs\Source\a.txt", or python's single quoted
What do you think about it?
My personal opinion is there is not sufficient gain in it worth to introduce a new syntax element. But it's of course up to the language designers to make that judgement.