Skip to content

Commit 417b2f8

Browse files
authored
[trivial] [spec/arrays] Use RATIONALE macro for ~ vs + (#4327)
Use inline expression rather than code block.
1 parent d37fe83 commit 417b2f8

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

spec/arrays.dd

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -470,15 +470,9 @@ assert(b == [1, 2, 3, 4]); // concatenate two arrays
470470
---
471471
)
472472

473-
$(P Many languages overload the `+` operator for concatenation.
474-
This confusingly leads to a dilemma - does:
475-
)
476-
477-
---------
478-
"10" + 3 + 4
479-
---------
480-
481-
$(P produce the number `17`, the string `"1034"` or the string `"107"` as the
473+
$(RATIONALE Many languages overload the `+` operator for concatenation.
474+
This confusingly leads to a dilemma - does `"10" + 3 + 4`
475+
produce the number `17`, the string `"1034"` or the string `"107"` as the
482476
result? It isn't obvious, and the language designers wind up carefully
483477
writing rules to disambiguate it - rules that get incorrectly
484478
implemented, overlooked, forgotten, and ignored. It's much better to

0 commit comments

Comments
 (0)