r/functionalprogramming • • Sep 06 '17

Python Using Python... Struggling with inconsistency...

I'm mainly working with Python at the moment. Most people in my company are using oop, which is kinda "natural" given the choice of the language. In general, I don't like oop. I prefer simple solutions to complex ones when they can solve the same thing and oop adds one layer of abstraction to functions. I value consistency and explicity. I hate it that in Python sometimes you call by reference and sometimes by value and there's no apparent model behind it. Most people are using oop coz they dont care as much about which paradigm to use and it's always easier to argue for oop since "everything is an object anyway" (which is not entirely true and how is that a valid argument..). Is there a way to be more "functional" with Python? Are there good argument against using oop? Or maybe I should just give up and go with the flow...

7 Upvotes

28 comments sorted by

View all comments

Show parent comment

5

u/ws-ilazki Sep 07 '17

Follow-up with links, now that I'm not on mobile:

Hy

Coconut

Basically, Hy gets you a lispy Python, while Coconut gives a Haskell/ML-y one

1

u/Lubbadubdub Sep 07 '17

Thanks!!! 😃😃😃

1

u/seestevecode Sep 11 '17

I'm trying to learn Python but prefer FP to OOP. Coconut looks like it'll be just what I'm looking for; thanks from me too.

1

u/ws-ilazki Sep 11 '17

haha, awesome. Good luck with it :D If I had a reason to spend more time with Python, it would definitely be a consideration. Borrows some nice features from ML-family langs, has an immutable data type, better lambdas, etc.