re-frame

Kimo 2025-06-09T16:28:32.446739Z

What's the best way for re-frame to provide alpha features? Currently we have re-frame.alpha which replaces every name in re-frame.core. Stable implementations, like reg-sub-fx, are slightly altered to support alpha features. That means you can't mix functions from both namespaces, so re-frame.alpha is contagious. You have to change every :require in your project from re-frame.core to re-frame.alpha. This all seems clumsy. I can imagine some other ways: 1. Have a whole separate artifact, and include the new alpha stuff in core: re-frame/re-frame {:mvn/version "v1.4.5-alpha"} Or: 2. Put only alpha features in re-frame.alpha. Add some runtime control flow to old features, like reg-sub-fx and subscribe, so that their behavior & performance are only different when you "use" alpha features. ◦ Maybe this could work with dead-code-elimination, not sure.

p-himik 2025-06-09T16:37:02.758169Z

A different namespace name doesn't have to be clumsy - see an example of the :ns-aliases option in shadow-cljs here: https://github.com/day8/re-frame-10x#easy-setup

👍 1
Kimo 2025-06-09T16:40:50.492799Z

oh yeah, maybe that's the way to go

Kimo 2025-06-09T16:43:41.984839Z

I still feel idea #2 might be more articulate. The code itself can indicate which alpha features are in use. That could come in handy when writing reusable re-frame code. On the other hand, it might just prove annoying later for users to update their code once we merge an alpha feature into core.