Fork me on GitHub
#membrane
<
2021-03-01
>
Jakub Holý (HolyJak)10:03:01

Hello! I was thinking about membrane's

(defeffect ::fire-missiles! [missile target]
  ...)
Coming from Fulcro, I really appreciate navigability, i.e. the ability to click on a thing in my IDE and get to its definition. I believe it really aids maintainability of a project using that. Currently I do not think that in any standard IDE I could click on [::fire-missiles! :space-missile :moon] and be brought to the definition of the effect. Of course I could simply use symbols instead of keywords: create my own
(defeffect2 fire-missiles! [missile target] ...)
that both defines an effect and also, when called as a function, returns a vector of its name as a keyword + arguments, i.e. [::fire-missiles! missile target] . Then I could return intents by this function-like call (fire-missiles! :space-missile :moon) . This gives me the navigability I want - provided I remember to tell my IDE that defeffect2 is a defn-like macro -while still fully integrating with membrane. My point is: wouldn't it be worth making this the default? I do not think we loose anything and we gain navigability?

phronmophobic07:03:47

Improving navigability would be great! There's a few related issues I want to think through before making changes. I'll file an issue with my thoughts tomorrow.

❤️ 3