News for hackers. Stuff that matters.
Re:The use of `class` for things that should be simple free ... by jabirali on Thursday May 28, 2020 @04:20AM (#23334835)
In many languages, it is an explicit parameter though.

For instance, in Python, one would define a function with `def fun(state)` or a class method with `def fun(self)`. In the function body, one would use respectively `state.var` or `self.var` to refer to a variable `var` in the state object. Running it is then done using `fun(state)` or `state.fun()`.

There are some minor syntactic differences between the two, but I find both these examples to be just as explicit...

There are no comments on this comment yet.