User loginNavigation |
State of objectsImagine having a purely object-oriented language, meaning that all algorithms (functions/methods/procedures) are methods in objects, and all value storing are also handled by objects. When a compiler see code for creating an object, it will implicitly associate a state with it. The state can be any of the following: It uses these states to determine what is legal syntax or not, and probably for doing optimization and what not. I'm playing with the idea to make these states not only visible for the programmer, but also extendable. If you combine this with the possibility to condition methods (members?) with the state, you can actually define an object that e.g. only allows a certain method to be invoked once. This would enable the compiler to enforce this statically whenever possible, and only do this enforcement dynamically when it is not possible to do this statically. Is there anyone out there who have tried this already? By Mats at 2011-08-31 07:27 | LtU Forum | previous forum topic | next forum topic | other blogs | 6655 reads
|
Browse archives
Active forum topics |
Recent comments
27 weeks 1 day ago
27 weeks 2 days ago
27 weeks 2 days ago
49 weeks 3 days ago
1 year 1 week ago
1 year 3 weeks ago
1 year 3 weeks ago
1 year 5 weeks ago
1 year 10 weeks ago
1 year 10 weeks ago