inline record initialisation #302
amitu
started this conversation in
Ideas & RFCs
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For this record:
We should be able to do this:
This is the "compact syntax". We will be very strict. Caption can not contain commas. Value in key value pairs can not commas or spaces.
The generalise syntax would be:
You can also do this:
or,
What If Caption Was Longer?
Since on it's own a long caption using continuation:
Think Not What Parser Can Parse, But What Would Confuse Humans
Even things that are technically parsable, we would chose not to parse, and raise error. We will optimise for what's crystal clear to human readers, and not for what all arcane stuff we can successfully parse.
Beta Was this translation helpful? Give feedback.
All reactions