5 ms·
The major thing Python has done is bring major functional design patterns, like maps, reductions, everything in itertools, and made human-friendly versions and
by blagie 4y ago
The major thing Python has done is bring major functional design patterns, like maps, reductions, everything in itertools, and made human-friendly versions and syntax for them. Right now, that covers 70% of the stuff I did in Scheme over C/C++ (weighed by volume of use, rather than by feature list). A lot of beginner programmers now use features like closures and decorators, and they're accessible.
The remaining 30% is awkward, but usually possible.
JavaScript is convoluted.... but after the learning curve, it does functional as well as anything, and better than most other things it does. It certainly does functional better than OO.
- int_19h 4y agoI would argue that, as far as popularizing sequence comprehensions goes, C# (LINQ) was probably more influential than Python.
- blagie 4y agoHejlsberg is a genius. Before C#, he designed Delphi, which was a pleasure to use. It made Pascal beautiful, which is not something many considered possible. Functionally, Delphi combined the ease-of-use of VisualBASIC with the power of C++, with an elegance unparalleled in any environment before. He did Turbo Pascal. It's hard to overstate how much of a revolution that was. Compile-wait-wait-wait-run turned into run. Now, he's doing TypeScript. I'm not sure it's really fair to compare anyone to Hejlsberg. "Sure, your kid won a Nobel Prize for his research, but Einstein did relativity...." "Sure, your business hit a billion dollars, but it's no Apple...." Acknowledging brilliance elsewhere doesn't reduce my appreciation of Python. It's a good language.
- xigoi 4y agoLINQ weirdly renamed basic FP concepts. Why is the map operation called “Select”? If anything, I'd expect the filter operation to be called that.
- tsimionescu 4y agoIt's SQL inspired language, because SQL is far and away more well known, and understandable, than functional programming. And that is one reason why LINQ is still one of the only functional collections APIs that exposes GroupBy, which is an extremely useful operation. Edit: correction, LINQ is no longer the only one that introduced GroupBy, but it was probably the first.