16

Doing a python code review after working in Scala is all:

"Why the loop? Can you just put a function here and... oh yeah, right... python does not allow it. I could have written these 20 lines in 4 if was Scala"

Scala, stop spoiling me!!

Comments
  • 1
  • 6
    I would bet that python could do it in that kind of line count of you did it right. The functional constructs it has are actually very powerful!
  • 3
    Like @Zaphod65 said I think it's pretty much doable. Python supports higher order functions. And had built in map and filter functions. So you can pretty much rewrite any loop in a functional way. Although it doesn't have tail call optimization, and has limited stack for recursion.
  • 0
    @Zaphod65 I am sure I am not that good in python and it can be done! I just wanted to rant on the middle of my own incompetence... ☺️
Add Comment