kdl-org / kdl

the kdl document language specifications
https://kdl.dev
Other
1.1k stars 61 forks source link

KQL: remove map operator and accessors #222

Closed zkat closed 2 years ago

zkat commented 2 years ago

Honestly, they're just too implementation-specific

danini-the-panini commented 2 years ago

My poor heart when I read this just as I finally finished getting my map operator and accessor implementations working 😭

zkat commented 2 years ago

Map operator is still great, and if implementations want something like that, it makes sense!

I just didn't think it made sense for the spec

fabiancook commented 2 years ago

The individual accessors without the map operator line up very nicely to JSX land concepts.

The map operator on the back of the accessors works really well too.

Since they have stayed in the spec this long, and map operators are optional now, instead of removing them both, maybe we should just map accessors optional too?

I have included both accessors and map operator support in the JSX query engine.

https://github.com/virtualstate/kdl/blob/464d0cd5e2aae99bdcc97f00ea8a50ce00a4021a/src/tests/readme.tsx#L79-L88