3 ms·
IMO Python and C# are not comparable. Python is at best a simple scripting language, you really can't build anything globally scalable on it. No offense to peop
by jeremycarter 4y ago
IMO Python and C# are not comparable. Python is at best a simple scripting language, you really can't build anything globally scalable on it. No offense to people who use Python daily, just my own observations (probably wrong).
- deleted 4y ago[deleted]
- pacifika 4y agoInstagram
- Barrin92 4y agothe biggest python codebase I'm personally aware of is JP Morgan's Athena and is about ~30 million LOC. Google, Youtube and Dropbox use Python extensively etc. Python being a scripting language stopped being a correct statement probably over a decade ago.
- jeremycarter 4y agoKeep telling yourself that and it will become true.
- diarrhea 4y agoYou said about yourself: > just my own observations (probably wrong). I am currently in the process of learning C#. I did a deep but brief dive into every language feature in C# 10. Being proficient in Python, absolutely nothing surprised me. All the same concepts, save for a handful, exist in either language, sometimes down to the exact keyword usage. LINQ is a big differentiator in favor of C#, but modern (that is, typed) Python looks very similar to C# (C# left, Python right): ABCs -- ABCs Interfaces -- Protocols/ABCs LINQ -- ?? Enumerable/Enumerator -- Iterable/Iterator class -- class static -- staticmethod foreach -- for for -- for(range(...)) try/catch -- try/except break/continue -- break/continue enum -- Enum struct -- dataclass, perhaps namespace -- automatic on the file level out -- pass by reference switch/case -- match/case (both do structural pattern matching) throw -- except typeof -- type overloaded methods -- singledispatch (only works for a single argument sadly, no stdlib multidispatch) inheritance (single) -- inheritance (multiple) object -- object (root of the type hierarchy) generics -- generics as well (via typing, runtime never cared anyway of course) lambda -- lambda nullability -- None (C# can have nullable reference types, Python types are not nullable, None exists as a first-class type, not a subtype of all other types; similar ergonomics but different structurally) extension methods -- just go wild in Python (although binding methods after class definition is cumbersome) tuples -- tuples (both can do unpacking, multiple returns etc.) operator overloading -- operator overloading reflection -- reflection (arguably a Python strong-point) async/await -- async/await decorators (exist as a pattern) -- decorators (supported on the syntax level) ?? -- top-level/first-class-citizens functions I probably got a couple wrong, but you get the idea: apart from LINQ, nullability handling and some others, the languages are incredibly similar in their feature set on paper. This is not talking about DX etc. though.