Consider making semicolon delineation stricter #43
Fishrock123
started this conversation in
Ideas
Replies: 2 comments
-
|
(Though personally I don't see much use in semicolon delineation here to begin with, this is a bit of a compromise.) |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I don't really like semicolons either and I feel the use case for data exchange is perhaps a bit limited: why would the serializer bother with encoding the special case of a list of empty nodes? I can think of two reasons (minified files and newline-delimited KDL) but both require semicolons for non-empty nodes as well. Maybe I am missing something though. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
(This is coming from the following twitter discussion: https://twitter.com/Fishrock123/status/1340133885988937728)
I think that being hand-wavy on newlines vs semicolons risks people not choosing one or the other, leading to JavaScript-esque style conflicts.
In my opinion, new languages should be prescriptive about their syntax and not overlap their features when possible, so as to decrease confusion.
As such, I propose that the spec be amended to only allow delineation / line continuation / "next node" via a semicolon only if the semicolon is followed by a whitespace (excluding line breaks) and then another node.
That is, keep this valid:
but make this invalid:
Beta Was this translation helpful? Give feedback.
All reactions