News for hackers. Stuff that matters.
Re:Stop writing classes... by kingkilr on Saturday March 17, 2012 @06:42PM (#3718443)
Do you think a closure isn't state?
Re:Stop writing classes... by jrockway on Saturday March 17, 2012 @06:56PM (#3718463)
He does, but he feels smarter if he emulates something everyone already does in a more obscure manner. Yesterday, I derived an n-algebra for feeding my cat. See how smart I am!?

(The reality is simple. Classes are Python's state-capture abstraction. Using a bunch of lambdas to do the same thing means you are writing Haskell in Python, which is a dumb thing to do, because while the computer knows what you want, other programmers don't. If you want to use Haskell, use Haskell.)

Re:Stop writing classes... by tkahn6 on Saturday March 17, 2012 @08:25PM (#3718671)
Ouch. No need to be condescending, Jon. When I write Python, I use classes and magic methods and all that jazz. Programming in a functional style in Python is often verbose and brittle due to the duck-typing. I was under the impression we were talking about programming in general.
Re:Stop writing classes... by funkah on Sunday March 18, 2012 @01:28AM (#3719195)
Ha, precisely.
Re:Stop writing classes... by omaranto on Saturday March 17, 2012 @10:18PM (#3718909)
I don't think the point was that this wasn't state, but that it's not hidden state if you explicitly pass needed data as parameters.