1

I understand that not every component of Functional Reactive Programming (FRP) may be implemented in most imperative languages purely as a result of how the language has been devised.

However, is it possible to use, say, events in C# to achieve a similar effect where a change in some input value cascades to update various objects? Or have I answered my question and there's really nothing else that could be done beyond variations of the "Observer" pattern? What about in other imperative languages besides C# (which I'm only mentioning here out of familiarity)?

Dulan
  • 352
  • 1
  • 9
  • 4
    Meet the [Reactive Extensions (Rx)](http://msdn.microsoft.com/en-us/data/gg577609.aspx) for .NET. – Jonathon Reinhart May 01 '14 at 01:54
  • On the contrary, having imperative capabilities facilitates the implementation of FRP -- but there is lesser need for FRP in imperative object-oriented setting where things are already changing with time. – lukstafi May 01 '14 at 08:29
  • I'll add, have a look at FRP in Scala, which uses imperative features unabashedly. – lukstafi May 01 '14 at 08:31

1 Answers1

1

Reactive programming is not specific to functional languages, just like functional programming is not specific to purely FP languages. Python, D, C#, and many other structural/OOP languages allow functional style code to various extents, with many other languages having FP libraries.

If you google around, you'll find reactive libraries for a lot of languages.

Llamageddon
  • 3,306
  • 4
  • 25
  • 44