www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - pretty printing escape char's on error?

Nothing major, but can be confusing:

Say I stuff up a string concatination:

return "    Name: " ~ name \n
(... some more stuff);

instead of
return "    Name: " ~ name ~ \n


dmd outputs:
 "D:\dmd\bin\dmd.exe" card.d -g -ofmain.exe -debug -v
card.d(217): found ' ' when expecting ';' following 'return statement' card.d(218): found '~' instead of statement
 Terminated with exit code 1.
At first glance this looks like it found a ', which is another small, but unnecesary (gah, s and c will be the death of me) hurdle for those new to D (or possibly any language) (also is it at all possible for errors in with scopes to be printed a bit better? They generally show symbols in the error lines isn't very helpful) -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
Nov 13 2004