architecture

vemv 2023-05-04T13:27:21.627589Z

Are there ClojureScript architectures that foster a pristine-pure functional programming model? The way I see it (which admittedly is a subjective definition of FP) is that one would be able to program with referentially-transparent, simple functions and data structures, without any sort of magic/reactive 'context' passed as a parameter (or much less, global state). Such a defn could as well be coded in .cljc with little to no differences between runtime branches. The framework would be plugged in at the edges of the application, instead of being something pervasive (and therefore difficult to swap). With these constraints, one would get specific benefits, e.g. being able to run 95% of your tests in any clojure runtime, very quickly (no IO involved). Or generatively test edge cases like ajax timeouts.

2023-05-21T21:57:12.369679Z

Have you looked at Coeffects[1]? This is the idea behind how Re-frame[2] handles the environment. 1. https://tomasp.net/coeffects/ 2. https://github.com/day8/re-frame

👀 1
apbleonard 2023-05-14T19:04:40.847899Z

I'm not a UI or clojurescript developer, but I am always looking architectures like that you describe. I really enjoyed this talk recently, which seems to be squarely in this area :) https://youtu.be/_g_Kyl4_TSA

vemv 2023-05-04T13:30:13.363149Z

A little extra context, I've wanted/envisioned this for a very long time. I have the impression that people (in misc JS dialects) want this, but in practice frameworks aren't exactly that functional even if going roughly in that direction.

rolt 2023-05-04T13:32:11.943979Z

what do you think of membrane ?

vemv 2023-05-04T13:36:18.147849Z

I didn't know it! Looks great. What's your take on it?

rolt 2023-05-04T13:37:50.053529Z

i want to try it, i completely agree with the philosophy, and it makes sense for java GUI. I'm not sure about targeting the browser