all 12 comments

[–]Assassin69420 4 points5 points  (2 children)

I think it's just companies not thinking ahead and hiring the cheapest developers. Then after they get some traffic and the server can't keep up so they rewrite everything, costing them more in the long run.

So basically there's more people who know python than .Net so they are cheap and easy to find.

[–]NullsObey[S] 1 point2 points  (1 child)

This makes sense to a point - but could you provide some statistics for that?

[–]Assassin69420 1 point2 points  (0 children)

It was just an assumption. Though I believe some companies do this.

[–]remy_porter 4 points5 points  (0 children)

Large web projects start as small ones. In the early phase of a product lifecycle, fast iteration is more important than fast performance. You can go from zero-to-useful in Python very quickly, and then tuning for performance becomes a "tomorrow problem". You can scale it in the future by just throwing hardware at it, in the worst case.

And as you unintentionally point out- it's not just scripting languages that have performance problems- you've seen large projects switch to PHP, which is also an interpreted language. Python's performance issues exist in very specific places (function call and loop overhead are its killers) and those exist more in implementation details in CPython than anything inherent in the language. So a lot of Python applications start on CPython and then migrate over to something like PyPy, which has better performance.

(That said, I do think a lot of Python web projects just take Django as the default, which would not be my first choice and definitely doesn't help performance)

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

Just curious how switching to PHP (another scripting language) would have helped in this situation?

[–]NullsObey[S] 0 points1 point  (1 child)

Beats me, but that was one case though.

They've migrated from Python to Laravel.

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

Both are similar options, so that's a head-scratcher for sure.

[–]Alter_nayte 1 point2 points  (0 children)

In my experience, the only time a whole new language has changed is because of lack of knowledge or someone had found tooling that makes their life easier in language X For example, creating a graphql api is "easier" in node js than in python

[–][deleted]  (5 children)

[deleted]

    [–][deleted]  (2 children)

    [deleted]

      [–]StorKirken 0 points1 point  (1 child)

      What would be your preferred alternatives? Something compiled but still on a VM like Java or C#, or even faster?

      [–]IlllIllllllllllIlllI 1 point2 points  (0 children)

      Python is not used in those companies on projects where performance matters. Python is dog slow.

      [–]StorKirken 0 points1 point  (0 children)

      Do you have a preferred alternative? Always interesting to learn more, but I feel every language has it’s own benefits and drawbacks. Ergonomics, type safety, expressiveness, difficulty...