DEV Community

Discussion on: Pitch me on Python

Collapse
 
rhymes profile image
rhymes

Python has a worse package manager than Ruby's (as in there are multiple and none of them are stellar), other than that is great and does everything Ruby does more or less, with some bigger communities (especially on ML, data science) and probably equally sized communities on web dev (though fragmented around two or three major frameworks: Django, Flask and FastAPI probably).

Python is less DSL oriented and you can mostly ignore multiple inheritance. Even its most popular testing framework, pytest, works great with declarative dependency injection: a test function can declare which objects it needs and the framework will provide it to it.

Python modules are easier to grasp than Ruby modules as well (also because they're not exactly the same thing :D).

Also, Python async game is a bit further on than Ruby's, especially around the paradigm of structured concurrency, very useful to rein in the complicated logic of async programming but requires a bit of paradigm shift so it's probably underused still.

As you know, I enjoy both :D

Collapse
 
stevenally profile image
......

Django seems easier to learn than Rails.

Collapse
 
faraazahmad profile image
Syed Faraaz Ahmad • Edited

I learnt Ruby on Rails first, then few years later I learnt Django. I didnt like Django at all.

I'm not throwing shade at django, its just everyone has their preference

Collapse
 
rhymes profile image
rhymes

that I don't know! They are very similar, one is MVC, the other one is MTV (Rails's controller actions are called views in Django and Rails views are templates in Django). They both have an ORM which requires some learning time. They both have lots of batteries included

Thread Thread
 
gigatt profile image
Evans✨

I just started my Django journey any tips??

Collapse
 
olney1 profile image
Ben

Flask is even easier.

Collapse
 
valentinesean22 profile image
Valentine Sean Chanengeta • Edited

i once heard some companies like quora are using python as their backend language. what could be the reason of this choice since python has a reputation of being slow? the question goes for all medium to large companies using python backend frameworks.

Collapse
 
rhymes profile image
rhymes • Edited

In my experience the language is not often the primary cause for "slowness". After all the majority of web apps are I/O bound. It is true that in benchmarks is not the fastest but speed of language isn't usually the only reason you choose to "lock in" into a community (which you do after all if you decide to invest for many years building a company with a stack).

That said, Quora is 12 years old. Go, which is often used as a comparison for fast productive languages with a garbage collector, is 12 years old ;-)

Thread Thread
 
valentinesean22 profile image
Valentine Sean Chanengeta

ok, on that point of Go, is not it by that time Java was there and i hear many people arguing for it as fast, stable and suitable for writing large complex systems

Thread Thread
 
rhymes profile image
rhymes

Dunno, Java being the defaultt choice was one of the reasons why I started using Python in the first place :) Again, I don't think you can measure developer productivity just by "fast". Otherwise we'd only write in C or Java but we don't ;-)

Thread Thread
 
valentinesean22 profile image
Valentine Sean Chanengeta

thanks you

Collapse
 
mohamed99elsokary profile image
mohamed

Let's say django is working on a compiled Versione of ur code that way we can find beats something like laravel so easy
And get some good response times ok not as fast as node or go or even .net but when the response time is good there is not big difference between 80 and 120 ms after all they both are great
So we they aren't thinking in that point in matter of speed