|
|
|
|
|
by adambard
2234 days ago
|
|
The "object" syntax reminds me a lot of Clojure/script's Hiccup (https://github.com/weavejester/hiccup) style, which has become a de-facto standard across many popular libraries. In hiccup, this example: {
tag: "button",
attributes: {
"id": "baz",
"class": "foo bar",
"data": "1",
"onclick": f,
},
children: [
"Hello",
{
tag: "em",
attributes: {},
children: ["there"],
}
]
}
Would be represented as: [:button#baz.foo.bar {:data 1 :on-click f} "Hello" [:em "there"]]
|
|
In other words, there is only one language and one syntax to deal with.