3 ms·
> 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 i
by 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.