From a4a414437de8b64950988c9220adc6c000555099 Mon Sep 17 00:00:00 2001 From: Alexander McCord Date: Wed, 5 May 2021 10:39:04 -0700 Subject: [PATCH] Move the recommendation to the design section. Also mention that the drawback is solved if we obey it. --- rfcs/syntax-direct-chain-of-string-term.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rfcs/syntax-direct-chain-of-string-term.md b/rfcs/syntax-direct-chain-of-string-term.md index fce5fd31..ac096306 100644 --- a/rfcs/syntax-direct-chain-of-string-term.md +++ b/rfcs/syntax-direct-chain-of-string-term.md @@ -29,9 +29,11 @@ Formally, the proposal is to move the `String` parser from `exp` to `prefixexp`: functioncall ::= prefixexp args | prefixexp `:ยด Name args ``` +The recommendation is that we should keep statements starting with string tokens as illegal syntax, as it is too niche to support use cases with side-effecting functions. + ## Drawbacks -Statements starting by parsing `prefixexp` will now allow string tokens to be parsed despite that the return values of the function calls are now discarded. The recommendation is that we should keep statements starting with string tokens as illegal syntax as it is too niche to support use cases with side-effecting functions. +Statements starting by parsing `prefixexp` will now allow string tokens to be parsed despite that the return values of the function calls are always discarded. This is a non-issue if we obey the recommendation to ban statements starting with string tokens. ## Alternatives