Static-dynamic interaction


Clojure gets static-dynamic interaction right. Immutability gives solid ground for dynamic features to shine. I got an urge to try to apply static-dynamic interaction to a wider set of problems.

This isn’t a technical blog post. It’s more of a philosophical musing. I think I’m taking a chance posting it here. Regardless, let’s see what happens!

Static-dynamic interaction

Comments appreciated!



static-dynamic language, it should be Julia, but it’s a lot more complicated than Clojure.

Compared with the traditional GUI, In use, react is the most complex GUI I’ve ever seen. so I think it’s a bit inappropriate in the architecture (data modeling).

I don’t like overly complex things, and maybe the dataflow-driven GUI will be better. The data model is like the vesa-lite of data visualization. Previously, I used this method to write the WinForms app using Clojure-CLR.


Hello @linpengcheng!

Thanks for the comment. I agree that Julia is interesting. A dynamic interface to a statically compiled language; an attempt to get the best performance possible given that you can work with the constructs in a dynamic way.

I didn’t quite catch how you related static-dynamic interaction to GUI frameworks. Did you think of it in relation to a specific paragraph in the article?


I liked it. Definitely a bit philosophical, but also with practical implications.

It reminds me of a theory about the universe I had read of. Can’t remember its actual name. But it hypothesize that the universe is fully chaotic. But that you can prove that within any chaotic system, you can have a subcontext with discernable patterns. Thus all laws of physics can hold, but only within their context. That might mean they hold only within part of the universe, and only for a set period of time for example.

Basically, chaos is dynamic by nature, but given context, it can have stability as well. And it might be that the universe is chaotic, yet we can still, within our context, take advantage of the patterns and the predictability of our surrounding.

I think a distinction needs to be made between chaos and dynamism though. Chaos is unpredictable, random, undeterministic, while dynamism is just a function of some input with a deterministic output. Static would be a constant, or deterministic function of no input.

Given a context, chaos can have dynamic and static components, as well as continue to show chaotic behaviors.


I don’t like the design of react, so I don’t think it’s suitable
as an example of this.

In Taiji figure, Yin (static, black) and Yang (dynamic, white) are strictly dividing lines, Yin (static, black) interacts with Yang (dynamic, white) similar to playing table tennis.

If the dynamic and static blend together, for the language, the project, the Code, It’s too messy, too complicated, too ugly.


  • Yin (Static, black): Warehouse, strict standardized immutable data model (Clojure persistent data structure with spec), RMDB.

  • Yang (dynamic, white): Workshop, industrial production line, My Pure Function Pipeline Dataflow, Clojure

  • Table Tennis Ball: Products that meet industrial standards (finished goods, raw materials, middleware), strictly standardized and immutable data

  • Table Tennis Net: Yin (Static) and yang (dynamic) dividing lines, Quality Control Department, Customs, jdbc, I/O, ring.