views:

38

answers:

1

As you may know, ActionScript allows you to mark a variable as [Bindable], causing any changes to that variable to have immediate effect all over your application. Pretty neat.

How would you implement this feature in your favourite programming language? My first guess was to use events or wrapper classes, but I couldn't come up with a clean solution to this. I am especially interested in doing this with Python or JavaScript.

+1  A: 

You'd use the Observer Pattern.

Helper Method