User loginNavigation |
Slots as reifications of OOP method namesI've sketched some ideas about slot-based interfaces as a way to turn method names into first-class citizens of the language, with an example of the resulting framework as applied to C++: "Objects, slots, functors, duality " The key idea is to treat objects as polymorphic functors and regard a method call like x.foo(arg1,...,argn)
as an invocation of x(foo,arg1,...,argn) If we now define a slot as a generalized functor accepting objects as their first parameter and with the following semantics: foo(x,arg1,...,argn) --> x(foo,arg1,...,argn) then objects and slots become dual notions, and many interesting patterns arise around method decoration, smart references, etc. I wonder if these ideas have been already explored in a more general setting than the toy framework described here. By Joaquín M López Muñoz at 2014-07-19 09:41 | LtU Forum | previous forum topic | next forum topic | other blogs | 5529 reads
|
Browse archives
Active forum topics |
Recent comments
27 weeks 2 days 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