Programming language or library for "Active expressions"

160 views Asked by At

I'm searching for programming languages, libraries or frameworks that provide "active expressions" in the sense of Excel formulae, where modifying the value of an entity will lead to recomputation of all expressions referencing said entity, potentially firing further recomputations.

I could imagine that using such a library or language would simplify the implementation and maintenance of our applications (air traffic displays) which basically visualise incoming data according to certain rules.

Who can provide references?

Kind regards,
Sebastian

4

There are 4 answers

0
SK-logic On BEST ANSWER

Cells library is an example of such a framework. It was ported to a number of different Lisps, and in theory the same approach can be applied with any other language.

0
Tyler Holien On

The observer pattern may be a good fit for your situation.

If your expressions are referencing one entity, the classic observer pattern will work well. If the entities being referenced are also expressions that reference other entities, and those entities reference other entities, and so on, you can see how it could become a tangled mess. In this case, a specific use of observer called an event bus could provide an elegant solution. This way, your entities register for and send events through a central event bus.

0
jswolf19 On

In the Flex SDK and C#, this is called binding, which basically uses events to keep everything up to date.

0
Christoph On

Have a look at the Reactive Extensions: http://msdn.microsoft.com/en-us/data/gg577609