Author here. I completely agree with you. Could have known all this before had I just read the itertools docs beyond permutations and combinations. It was only after using Scala's groupby while solving an assignment problem that I thought about finding out an equivalent in python. And thanks to having worked with the Stream class from Scala collections, for the first time the rest of the itertools also made sense. Better late than never I guess :-)
Is there any reason that you don't switch over to Scala for your main programming language?
I'm in the process of converting a middle-sized PHP codebase completely over to Scala. It is not uncommon for me to see functions that run between 15 and 30 lines shrink to 3 or 4 line functions thanks to the Collections API. On top of that its performance is something you'll never see in PHP or Python. I love Python for its readability and wonderful syntax, but Scala is starting to have an even greater pull on me for its built in concision and the ability to use the entire Java ecosystem without submitting to java's imperative style.
It's very tempting. Frankly, I had enrolled for the course mainly for functional programming and not Scala but towards the end I started liking it. But, at the moment my main languages at work are Python, Erlang and Javascript and I still have a long way to go with these so planning to stick to them for a while.
Comments
Author here. I completely agree with you. Could have known all this before had I just read the itertools docs beyond permutations and combinations. It was only after using Scala's groupby while solving an assignment problem that I thought about finding out an equivalent in python. And thanks to having worked with the Stream class from Scala collections, for the first time the rest of the itertools also made sense. Better late than never I guess :-)
Is there any reason that you don't switch over to Scala for your main programming language?
I'm in the process of converting a middle-sized PHP codebase completely over to Scala. It is not uncommon for me to see functions that run between 15 and 30 lines shrink to 3 or 4 line functions thanks to the Collections API. On top of that its performance is something you'll never see in PHP or Python. I love Python for its readability and wonderful syntax, but Scala is starting to have an even greater pull on me for its built in concision and the ability to use the entire Java ecosystem without submitting to java's imperative style.
It's very tempting. Frankly, I had enrolled for the course mainly for functional programming and not Scala but towards the end I started liking it. But, at the moment my main languages at work are Python, Erlang and Javascript and I still have a long way to go with these so planning to stick to them for a while.