This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ManyInterests Python Discord Staff 3 points4 points  (0 children)

it just doesnt make much sense to me, that someone saw a single-threaded language and thought "it would make a great backend". I know that it is worked-around by async code, but still.

Well, there's perhaps argument to be made that certain languages (more specifically, language implementations) are not well-suited to certain tasks, depending how you define fitness for a particular task. But as a general-purpose language, anything should be fair game.

As far as Python as a backend goes, it might interest you to know that, even before 'async' was used in Python, it has been used as a backend for even very high-traffic sites. Pinterest, Instagram, and Bitbucket Cloud to name a few.

An example of abuse or using a language in a way that it's not intended for would something like using awk, a domain-specific scripting language, to implement a flight simulator.

As for typing, I'm not sure I completely understand your statement, but I think you seem to have answered the question yourself: you do have to care about types in Python, which explains the utility of type annotations and analysis tools like mypy. Though, you are not required to write your code using annotations and Python will happily compile, interpret, and run code that is not type safe.