Fork me on GitHub
#portal
<
2022-05-29
>
p-himik10:05:32

Why does the README recommend using #'p/submit instead of plain p/submit? I understand how it would be useful to somehow who's working on Portal itself. But how is it useful for regular Portal users?

djblue15:05:04

It's to allow for remove-tap, if the target tap fn is redefined

p-himik15:05:55

But that's my point - for it to happen, the user has to be working on the Portal itself, right? Because it's not a user-provided custom submit but rather p/submit - a part of Portal. Maybe it's just me, but I find it a bit confusing. Especially when the documentation mixes p/submit, some custom submit, and inline (partial ...) (which automatically prevents you from redefining or removing a tap), all while the #' is useful only for the second case.

p-himik16:05:54

To elaborate a bit on why it confuses me: when I see #', even though I myself never use it, I immediately think: "The code that follows that reader tag is expected to be changed and reloaded by the user at some point". So when I see #'p/submit, I immediately think that the user of Portal is expected to be changing Portal itself, for whatever reason. And when I consequently see (add-tap (partial p/submit ...)), it's an immediate signal that this part is not expected to be changed or reloaded by the user, for whatever reason. And then there's a whole thought train in search of all the "why"s. :) But again - maybe it's just me.

djblue22:05:19

All fair points. I'm open to a PR which simplifies the docs :thumbsup: