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 | 5502 reads
|
Browse archives
Active forum topics |
Recent comments
20 weeks 1 day ago
20 weeks 1 day ago
20 weeks 1 day ago
42 weeks 2 days ago
46 weeks 4 days ago
48 weeks 1 day ago
48 weeks 1 day ago
50 weeks 6 days ago
1 year 3 weeks ago
1 year 3 weeks ago