3 ms·
>Hence, having the standard that all functions get the context always seems excellent because it is no longer something to think or worry about and doesn't incr
by trhway 12y ago
>Hence, having the standard that all functions get the context always seems excellent because it is no longer something to think or worry about and doesn't increase code length by an unreasonable amount.
how about new paradigm - context-oriented programming :) where, like "this/self" in OOP, ctx is always present. And looking through the posted article Google is somewhat there with context [instance level] kind of inheritance (the context tree)
- mhogomchungu 12y ago> how about new paradigm - context-oriented programming :) where, like "this/self" in OOP, ctx is always present. This is how OOP in C is done though usually its done with the context being an opaque object. Having functions with multiple arguments that depends on other functions with multiple arguments that depends on yet other functions with multiple arguments will result is very hard to manage function dependencies sooner or later and "context-oriented-programming" solves this problem very nicely. A function that takes a single argument as a pointer to a struct can be extended indefinitely without breaking the function API.A function that takes its arguments by individual arguments will break everytime it need to be extended by an additional argument.