Closed wilkerlucio closed 5 years ago
Could the mutations allow vectors with first element being a symbol too? Why? Vectors are nicer if you are creating the syntax programmatically:
['(add-customer {:name (if true "tommi" "pommi")})]
; [(add-customer {:name (if true "tommi" "pommi")})]
[(list 'add-customer {:name (if true "tommi" "pommi")})]
; [(add-customer {:name "tommi"})]
[['add-customer {:name (if true "tommi" "pommi")}]]
; [[add-customer {:name "tommi"}]]
there would still be parameters using the list syntax...
... or is the preferred way to use syntax-quote & unquote & unquote-splicing?
[`(add-customer {:name ~(if true "tommi" "pommi")})]
; [(user/add-customer {:name "tommi"})]
@ikitommi thanks for the feedback, all the options you said are good, I'm trying to avoid for changes in the syntax at this moment since this is just re-using the same that's been working for quite a time, I think lists for calls also make good to explicitly and match Clojure function calls (which they are very much like). Today currently on Fulcro the most common thing is using quote & unquote like you mentioned.
The existing call syntax is preferable, since it looks like what it is meant to be: a call. The trick in fulcro incubator about declared mutations eliminates the need for the syntax quoting as well, and as Wilker says it has been working for years quite well now.
This is the first draft of the specs, I appreciate any input about how to better clarify each section and English corrections.