• 0 Posts
  • 8 Comments
Joined 2 months ago
cake
Cake day: August 21st, 2026

help-circle
  • I write C# and Python, and C# is much more expressive than Python is and performs about 10x to 77x better. C# has much better pattern matching and has operators to deal with null and support for it in the type system. C# records can be serialized without issue (Python’s built in JSON serializer can only serialize dictionaries). Althoigh variable scoping in C# isn’t perfect (object patterns in if statements pollute the outer scope) variables at least aren’t just function scoped like in Python. You can define user defined primitve types in C# which enables bettrr support for domain typing than what is possible in Python.


  • I think his point was that Python is more useful for one-off stuff and I’d claim that much better than bash at those kinds of things.

    But Python has so many quirks and bad designs. Function scoped variables, multiple inheritance, backwards comprehension syntax, poor pattern matching, poor handling of None and so much is convention based so you don’t get an error if you did it wrong. Python classes aren’t serializable (not even data classes).

    Coupled with it’s awful performance I’m convinced the reason people use it is because they don’t know anything else.




  • Yeah, Python as a language is a mess IMO. We used it for making a electrical simulator and the language is…bad. The variable scoping, lack of explicit variable declaration, backwards comprehension syntax, the VERY CONFUSING object orientation design, that classes aren’t serializable by default, package story and deployment… It really has very little going for it, and combine all that with the awful performance characteristics it’s just…no.

    Today I’m “Rust if it fits, if not Rust then C#”. We re-wrote the simulator in C# and performance was 70x better and the code got shorter, the deployment was hell of a lot easier since we went AOT and it just builds a native binary for the target platform. No virtual environment crap.