Non-initial characters include any decimal digit (0-9) #158
-
First of all, I think KDL looks awesome so great work. I was reading through the spec and believe I found a difference between KDL and SDLang that impacts one of the use cases mentioned on the SDLang homepage that I didn't see mentioned in the readme. Curious if I am correct and, if so, as to your reasoning. On the SDLang homepage they mention being able to represent a matrix like:
However in KDL, given that the elements within a child block are nodes, and nodes must either begin with an identifier or a quoted string, wouldn't this not be allowed within KDL given the non-initial character constraints? According to the spec, I would be able to do:
but then given that I am representing a matrix that I would like to interpret as numbers, this changes the meaning. I also realize that I could do something like shown below but this could quickly become verbose.
Curious if you think this is a valid use case and if it justifies allowing identifiers to be numbers, or, at least, to start with numbers. I could see a similar situation as to what you specify for strings in that a node can be
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
This was intentionally removed because I found anonymous nodes kinda awkward to work with, and then I added string-name nodes, which conflict with that feature. The SDLang example basically translates to this, internally:
My personal recommendation when you just want an "anonymous" node is to use
I actually prefer this because I find that the matrix example from SDLang obfuscates the fact that these are just 3 nodes and makes it seem like you can arbitrarily organize values like that? Does that make sense? |
Beta Was this translation helpful? Give feedback.
This was intentionally removed because I found anonymous nodes kinda awkward to work with, and then I added string-name nodes, which conflict with that feature.
The SDLang example basically translates to this, internally:
My personal recommendation when you just want an "anonymous" node is to use
-
as a name, which seems to be something that's increasingly popular among the early adopter crowd:I actually prefer this because I find that the matrix example from SDLang obfuscates the fact that these are just 3 nodes and makes it seem like you can arbitrarily organize values like that? Does that make…