question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

REPL pretty-printed output does not distinguish between escape sequences and escaped escape sequences

See original GitHub issue

These strings are different:

scala> "\n" 
val res0: String = "\n"
scala> "\\n" 
val res1: String = "\n"

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
smartercommented, Mar 9, 2018

Dotty isn’t going to inline anything compiled by Scala 2, including the standard library. Running our standard benchmarks won’t help you here since we don’t benchmark the REPL. In any case, I doubt this is going to make any perceivable difference in performance.

1reaction
jendrikwcommented, Mar 9, 2018

I think this could be fixed by simply adding the backslash as a special case to be escaped in library/src/dotty/Show.scala for stringShow and charShow.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python ignores escape sequences [duplicate] - Stack Overflow
The problem is that the input does not contain spaces; it contains actual backslashes etc. which need to be converted. Backslash is a...
Read more >
escape sequences - Replit
Run Python code live in your browser. Write and run code in 50+ languages online with Replit, a powerful IDE, compiler, & interpreter....
Read more >
Escape Sequences in Java - GeeksforGeeks
The total number of escape sequences or escape characters in Java is 8. Each escape character is a valid character literal.
Read more >
39 JSON in Oracle Database
You can use explicit ASCII escaping on input data. Because JSON data uses Unicode internally, when it is output, character-set conversion still applies,...
Read more >
Strings - Julia Documentation
Conversion via codepoint(char) will not reveal this encoding because it always returns the Unicode value of the character. print(io, c) of any ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found