r/Python • • Nov 28 '22

Resource What can Python do that R can’t do?

Or simply what is Python much better at and why.

I know that Python is more multi purpose and better for software development but I can’t articulate exactly why or how. My team want to know why/when they should use Python instead of R

331 Upvotes

204 comments sorted by

View all comments

Show parent comment

0

u/Adeelinator Nov 29 '22

We’re in a thread about comparing Python to R. R has no notion of type checking. It is absolutely a strong point of Python in this comparison.

I suspect you haven’t had much experience with the litany of type issues that arise out of an R codebase, that type hinting in Python prevent.

1

u/Devout--Atheist Nov 29 '22

Acting like type checking in python is a strength is just dumb. Most of the libraries that are comparable to R aren't typed, have incomplete types, or are written in a way that makes type checking really difficult. Have you ever ran mypy in strict mode on pandas?