Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Event-Driven Programming #15
I was thinking about how event-driven programming could work in Orange. My solution uses a
My example here will be making a lot of assumptions about other Orange features, but I'll explain them along the way.
This would work by whenever the
The compiler would know what methods change which members of a class.
Polymorphic objects will essentially work the same way: when calling a method on a polymorphic object, its event handler will be updated. It doesn't matter if anything is watching it or not.
Now, when you use the
Let's expand our example to have a more detailed condition:
This works very similarly to before: on the
The implmentation of this and figuring out all the details will definitely be tricky, but I think this could be a powerful feature. Imagine if it existed for an http server: