- Discover list comprehensions
- Discover generators
- Incorporate map, reduce, filter, iter, range, xrange often into your code
- Discover Decorators
- Write recursive functions, a lot
- Discover itertools and functools
- Read Real World Haskell (read free online)
- Rewrite all your old Python code with tons of higher order functions, recursion, and whatnot.
- Annoy your cubicle mates every time they present you with a Python class. Claim it could be "better" implemented as a dictionary plus some functions. Embrace functional programming.
- Rediscover the Strategy pattern and then all those things from imperative code you tried so hard to forget after Haskell.
- Find a balance.
- 掌握 list comprehensions
- 掌握 generators
- 代码中经常使用 map, reduce, filter, iter, range, xrange
- 掌握 Decorators
- 大量使用递归函数
- 掌握 itertools 和 functools
- 读书 —— Real World Haskell(评论中作者说不一定要局限于这本书,可以阅读任何关于函数式编程的书籍,比如SICP等)
- 重写自己的老派Python代码,使用高阶函数,递归等
- 当你同事给你看任何用Python做的类实现时,烦死他。告诉他更好的办法时通过dictionary加上函数,拥抱函数编程。
- 重新掌握 Strategy 及其他模式
- 找到平衡
http://stackoverflow.com/questions/2573135/python-progression-path-from-apprentice-to-guru
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于