1

How do I implement C# style signals or AS3 style events in Scala? I mean mostly observer pattern. To dispatch change events. Thanks.

Or (what's even better) are there any libraries/framework which do just that?

Valentin Simonov
  • 1,768
  • 10
  • 14

1 Answers1

5

I'd suggest reading Deprecating the Observer Pattern first, for inspiration and to get a taste of where things are going.

Then, have a look at how scala-swing uses "reactions" to see how you can do this kind of thing in a library.

Finally, note that first-class functions make implementing the observer pattern yourself relatively easy.

Community
  • 1
  • 1
Alex Cruise
  • 7,939
  • 1
  • 27
  • 40