TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Bthreads: A Simple and Easy Paradigm for Clojure

85 pointsby refset6 months ago

3 comments

refset6 months ago
Context from the previous post in the series:<p><i>&gt; Behavioral Programming is a relatively new programming paradigm that excels at isolating and composing behaviors in event driven system.</i><p><i>&gt; Behavioral programming was invented by David Harel[0], who also invented statecharts in 1987. It uses independent units of behavior, called bthreads, which are coordinated in a pub-sub protocol.</i><p>[0] <a href="https:&#x2F;&#x2F;cacm.acm.org&#x2F;research&#x2F;behavioral-programming&#x2F;" rel="nofollow">https:&#x2F;&#x2F;cacm.acm.org&#x2F;research&#x2F;behavioral-programming&#x2F;</a> (2012)
评论 #42103285 未加载
thom6 months ago
It&#x27;s an interesting paradigm. I would be very intrigued to see this implemented at scale, with all sorts of cross cutting concerns (logging, persistence, multiplayer and auth, displaying an error message when you try an illegal move or confirming when you win etc). Feels like a lot of COMEFROM-style code if you&#x27;re not careful. That said, I am fascinated by the idea of append-only codebases - what would it look like if we performed less surgery inside our codebases, and instead merely added to them or overrode bits of them as time passed? I think most people would recoil in horror at the thought, but in a way a lot of long-term architectural decisions are made to support that kind of change in a system. How could we make that more natural? The behavioural programming approach certainly lends itself to more agility via extension rather than rewriting.
评论 #42106788 未加载
评论 #42106878 未加载
elcritch6 months ago
This seems like it could be promising for embedded and real time event handling. I dislike async programming.<p>Though it seems possibly similar to ECS systems? Can anyone comment on that aspect?