I simply do not like the idea of a physical symbol to designate that the statement continues on the next line.
1. My reason is that such a symbol is NOT included by any kind of automated code generation-like Excel macro recording. Therefore, its use is going to be highly subjective and will vary from user to user in any team. Anyone using the continuation symbol for compactness will use it differently from someone using it for readability or simply using it at will.
- Code: Select all
a←1&
3⍴ &
1, &
2, &
3
⍝ Will the result have 3 or 13 elements?
⍝ On balance, what was the developer's intention, bearing in mind that 1+2 and 1+ 2 and 1 + 2 and 1 +2 are valid (synonymous) expressions?
2. I have used continuation symbols in Visual Basic, seen it in Excel VBA, and is available in Visual Basic.NET: from my point of view, it simply adds clutter and represents yet another source of syntax error. These environments have continuation symbols because they do not have line terminators.
But, if you must have a continuation symbol, my first preference will be to have a facility for word wrap in the editor. [][CR, []VR already word wrap in the interactive window. Incidentally, when you use either of these to list a function, copy and paste the output into a Word document and then find that you need to remove the line breaks, it becomes an absolute pain.
If you must have a continuation symbol, I think it must be a symbol that does not add clutter: I have suggested Ctrl+Enter (which will also pose the same dilemma as I have illustrated in the code block above).
C# treats
all lines as continuation lines unless the line has a terminating semi-colon. After all these years, having a line terminator as mandatory for APL code will be heresy.
C# does not have continuation lines: it has line terminators. Its debugging facilities (F10, F11) treat lines as consecutive characters <after> one semi-colon up to and including the next semi-colon ... (but it is not as simple as just this, since double braces and <using> statements have other rules).
PS:
1. What would be the rules for comments with multi-line statements?
2. Would a space (or any other series of characters) after the continuation symbol generate a syntax error?