Re: To align, or not to align?

2019-04-19 Thread Alex Buckley
On 4/18/2019 11:32 AM, Brian Goetz wrote: One view is that a string literal is the sequence of characters between the delimiters, and a multi-line string literal is just a string literal that happens to be able to span lines. This is also the simplest extension of existing string literals to

Re: To align, or not to align?

2019-04-18 Thread John Rose
On Apr 18, 2019, at 12:31 PM, John Rose wrote: > > I think it's hard to make these be more convenient (readable, > editable) than Jim and Brian's rules for stripping. They definitely > have an "opt-in" feel to them, because of their extra overheads. To clarify this paragraph: I mean that a

Re: To align, or not to align?

2019-04-18 Thread John Rose
On Apr 18, 2019, at 12:02 PM, Kevin Bourrillion wrote: > > Gonna requote it: > > "When I open a block, I increase [indentation level] by N. When I close a > block, I decrease it by N. Continuation line, maybe +2N. I move in and out > based on what's happening locally. However, I have no care

Re: To align, or not to align?

2019-04-18 Thread John Rose
On Apr 18, 2019, at 11:32 AM, Brian Goetz wrote: > > So I think the question really comes down to: what _is_ a multi-line string > literal. As an aficionado of philosophy, I'll take a stab at this. You can judge whether it's useful or not. A string literal is a *convenient* and *natural*

Re: To align, or not to align?

2019-04-18 Thread Guy Steele
> On Apr 18, 2019, at 1:30 PM, Kevin Bourrillion wrote: > . . . > Interesting! I think this is exactly opposite to what's really going on. > > Here's how people think of their program indentation. When I open a block, I > increase it by N. When I close a block, I decrease it by N.

Re: To align, or not to align?

2019-04-18 Thread Brian Goetz
- It is not an orthogonal decomposition; we're tying ML-ness to alignment.  The language should expose primitives that the user can combine compositionally. Interesting!  I think this is exactly opposite to what's really going on. Here's how people think of their program

Re: To align, or not to align?

2019-04-18 Thread Guy Steele
, that the syntax ends with a delimiter, that ** the _content_ of the multiline string consists of the _entire_ sequence of characters between the delimiters **, and that ** the job of align-by-default is to adjust that content (according to some rules) **. There is an alternate approach that views

To align, or not to align?

2019-04-18 Thread Brian Goetz
This could be exposed as either a language feature, or a library feature, or both. The question we're now ready to confront is: how should a user indicate that they do, or do not, want alignment?  Options include:  - Align by default, with some sort of opt-out  - Do not align by default, with