There are some languages that do this, especially reactive languages and there are some libraries for other languages that work kinda like this, for example Rx[1] works kinda like this or maybe Clojure's Javelin[2]. You could make an Rx-like system that works somewhat like that in C++, or you could use coroutines or a task-based system like Intel TBB to implement something kinda like this. It of course wouldn't be a first-class thing like in Concurnas, but I reckon you could implement the basic idea.
As far as languages go, the ideas you showed look similar to how Esterel[3] works, or perhaps Occam[4].
[2] https://github.com/hoplon/javelin
[3] https://en.wikipedia.org/wiki/Esterel
[4] https://en.wikipedia.org/wiki/Occam_(programming_language)
Also https://en.wikipedia.org/wiki/Dataflow_programming has a list of 30+ languages.
Thanks for these. Looks like Esterel commonly compiles to C and I would imagine uses some features of pthreads along with task-based scheduling as you mentioned.
That's partly how Qt's QML works (which makes it a breeze for UI): https://doc.qt.io/qt-5/qtqml-syntax-propertybinding.html
In a language that supports Monads (e.g. Haskell or Scala), the above could be implemented as a library.
Re:The Concurnas Programming Language
by artemonster on Thursday May 28, 2020 @11:25AM
(#23338411)
can you recommend something to read to be able to understand more parctically HOW to implement those with monads? thank you
Monads are a pattern for sequential composition of effectful computations (i.e. statements). Some expessive languages, such as F#, Haskell and Scala support a special overloadable syntax for any arbitrary monad, therefore giving a fully programmable notion of statements.
For background reading in this area, perhaps start with "A poor man's concurrency Monad" by Claessen, it's a very easy read and shows how green threads can be written as a user library allowing pluggable schedulers. F# also implements its asynchronous workflows using essentially this technique, see "The F# Asynchronous Programming Model". LINQ and the reactive library Rx from C# are also great examples of Monads.
You can do this in Kotlin if you want to. It comes with coroutines support out of the box. With things like Channel and select you could implement trans as well.
Re:The Concurnas Programming Language
by fluffything on Thursday May 28, 2020 @10:16AM
(#23337500)
Most languages implement these as a library.
I imagine needing registrations of these conditionals in the VM to watch and execute.