String reboot - (1a) incidental whitespace

Brian Goetz brian.goetz at
Wed Apr 10 20:54:24 UTC 2019

This is a plateful!

Stripping "incidental" whitespace is an attractive target of 
opportunity; the real question is, can we do it right enough of the 
time, and when we get it wrong, is there an easy way for the user to 
recover and get what they want?

Kevin described this as: "find the magic rectangle"; that there should 
be a rectangle enclosing the snippet that sets apart the incidental 
whitespace from the essential.  In your examples, most of the time, the 
magic rectangle is, well, the actual rectangle in your text.

> Examples;
> String a = """
>  +--------+
>            |  text  |
>  +--------+
>            """; // first characters in first column?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the amber-spec-experts mailing list