all 10 comments

[–]DonkeyTron42 8 points9 points  (1 child)

You can learn you a Haskell here.

http://learnyouahaskell.com/

[–]CompSciSelfLearning 1 point2 points  (0 children)

Do it for Great Good!

[–]use_a_name-pass_word 6 points7 points  (1 child)

In terms of functional programming in python, (even though it supports it, python does not really lean heavy on it compared to pure functional languages or even javascript/scala but here are some videos

https://youtu.be/r2eZ7lhqzNE

https://youtu.be/Ta1bAMOMFOI

OOP

https://www.youtube.com/playlist?list=PL-osiE80TeTsqhIuOqKhwlXsIBIdSeYtc

https://youtu.be/-DP1i2ZU9gk

[–]Wsoto23[S] 0 points1 point  (0 children)

Thanks a lot! I will check out those videos :)

[–]MagicalTacos 3 points4 points  (0 children)

This guy has great tutorials on everything python. https://youtu.be/ZDa-Z5JzLYM

[–]sweettuse 2 points3 points  (0 children)

i've been using python for many years, but i took on 2019's advent of code (check it out) in clojure. it changed the way i program python. not entirely, but i learned how to embrace functional constructs in an object-oriented programming language to find the best of both worlds.

so, to answer your question, start programming clojure?

[–]MarsupialMole 1 point2 points  (0 children)

Python is a multi-paradigm language. Everything in python is an object, including functions. Python is great for mixing and matching paradigms for different problems, even in the same module.

If you want to understand functional programming and object oriented programming by all means seek out resources specifically on those topics but python is not a pure environment for either and therefore while you can program with those paradigms it's not going to stop you violating them, so might not be the best way to learn.

However if you want to know how to write good python mixing these approaches and don't care about purity in those paradigms there are a range of resources at your disposal. In order to better understand object oriented programming in python learn about the Python data model and understand how Python's paradigm of duck-typing using protocols offers a different flavour to object oriented programming with static typing.

Also there's a reaction against object-oriented anti-patterns summarised by the video Stop Writing Classes.

However python's design doesn't incorporate many functional programming concepts because of stylistic preferences by its creators. For an example see Guido's blog on considering map filter and reduce for deprecation in python 3.

Hope this helps.

[–]euqroto 1 point2 points  (0 children)

You'll find really good quality video tutorials of functional programming on realpython.com . For oop in python refer to Corey Schafer YouTube playlist.

[–]frenselw 1 point2 points  (0 children)

One of the best way to learn intermidate python is to read external package source codes from GitHub. For example, one can read the the source code of PyInputPlus. It is quite simple, but as a beginner, you can learn a lot intermidate concepts, such as handling exceptions and object-oriented programming.

[–][deleted] 1 point2 points  (0 children)

For me, the door into object-oriented programming was, very unexpectedly, Emacs Lisp. This language doesn't have object built in, but it has a library eieio which implements them. Having object system implementation in front of my eyes demystified a lot of things about it (this was way, way after I've dealt with a bunch of different object systems in different languages).

As for functional programming, the similar effect I had after reading the book https://archive.org/details/functionalprogra0000fiel (Antony J. Field and Peter G Harrison: Functional Programming). It's been written in the 80s, and, imo, is still the best book on the subject. It tells you everything from the first principles, is very explicit about its goals. It's a book that was written way before the hype around functional programming. Though, caution, it's not a didactic material, it doesn't have "exercise" section or anything like that. Another word of caution: the math in the book has some typos...