-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skipping brackets on the top level structure #297
Comments
On one hand, I'm worried that this would be yet another complication. |
This would be a big pain to support in my Intellij IDEA plugin. Please don't do this. When you omit () or {} it becomes a problem to make parser understand what it sees Anyway, I don't see a problem to write it like this if you don't want to waste lines of code:
|
@madwareru there are three possibilities. And content in () cannot be parsed the same way as content in {} or []. They overlap only if empty. |
I don't argue that there is a possibility to support it. I argue about the complexity it leads to. Anyway, if it would only be an extension, I'd may just say that my plugin does not support it, so may be this is not such a problem |
in fact, content in () and [] could be parsed the same way (a tuple vs a list), but author didn't suggest [] omittance |
Or, indeed, as a list vs a fixed length array. I'd definitely want to omit [] same as the others (that's largely what my usecase is), I'll edit the first post to reflect this.
and
are both possible, you need to check whether something is a tuple/fixed array or struct by checking the contents. |
What purpose in using () for tuples? Tuple is essentially a fixed sized array of heterogeneous types. |
We use |
Issue has had no activity in the last 180 days and is going to be closed in 7 days if no further activity occurs |
comment |
I've given this some thought. If we deserialize with type information, then adding the extension isn't a problem. However, things get tricky with |
@MomoLangenstein I don't think we should support this, it completely changes the grammar of RON. Right now extensions do not interfere with parsing (only deserialization, that is the data model) and I don't think the parser should be configurable, because that would complicate everything. RON would no longer be a format but rather a "format kit" if that makes sense. |
@torkleyy That makes sense. Shall we close this issue then? |
Yeah. |
Would it be possible/reasonable to skip the surrounding
()
,{}
, or[]
on the top level structure in document?As it is a config needs to be saved as something like:
It'd be a lot cleaner to my mind if we could skip the surrounding brackets and just write it as:
The text was updated successfully, but these errors were encountered: