4 ms·
>You know, like, function arguments. That's a good idea! Although... I wonder if you would get tired of passing around the same piece of data between such func
by layoutIfNeeded 7y ago
>You know, like, function arguments.
That's a good idea! Although... I wonder if you would get tired of passing around the same piece of data between such functions all the time? Here's a crazy idea: what if we pass the data implicitly to such functions? Like, we could pretend that the data was passed to the function as a hidden argument, and we could call this argument "self" or "this"! :O
- overgard 7y agoOr! You could just pass in a data structure without methods! The problem with global variables is implicit dependencies, and with “this” or “self” you now have slightly scoped implicit dependencies. I say slightly because you still have to worry about base classes. It’s the same problem just more contained.