19 ms·
What are advantages of Python over C#?
by V-2 11y ago
What are advantages of Python over C#?
- Alupis 11y ago> What are advantages of Python over C#? Well, a major one that comes to mind (and may change as things progress) is application portability. The open CLR project hasn't gotten far enough yet to truly be cross-platform capable. It's also smaller in weight and baggage, some argue faster to prototype/develop-in, community driven (no decade of a single company's inner departments fighting over features and behaviors), it wasn't born out of NIH syndrome, etc... In a lot of ways, it is a lot more attractive than C# will ever be.
- V-2 11y agoPortability is a valid concern - depending on the context - but it's not an innate quality of the programming language, in and of itself. Ease of prototyping is a general advantage of scripting, dynamically typed languages, so this is apples and oranges really. Or like insisting that Yamaha is superior to Mercedes, of all car manufacturers, because motorbike is more useful in heavy traffic :) Statically typed languages bring other advantages to the table, they shine is bigger projects. As for NIH syndrome, once again this is "ancestral sin" at best, not a downside of the language as such. Still, it wasn't exactly that way. Microsoft didn't try to tout a brand new language at first, they attempted to improve on Java with J++, but they got sued by Sun and this pushed MS to announce C#. This being said, C# wasn't a corporate rebranding, it's offered substantial improvements over Java, and to this day Java is either playing catch-up (eg. Streams vs. LINQ, abysmal DateTime API only replaced with something more reasonable in java 8), or just remains inferior (type erasure vs. reified generics, checked exceptions etc.) I don't really code in Python, but at first glance it is missing some goodness you can get in C#, for instance the support for functional programming (or elements thereof) - I'm thinking about lambda support limited to single expressions.
- jeffmk 11y agoSerious question: what function features do you think Python's missing, that C# has (other than the lambda point)? Python indeed supports some functional paradigms: - functions are first-class citizens - list and dict comprehensions, generators - map, filter, reduce, etc. for data pipelining (though these specific idioms are/were contentious [1]) - lambda for anonymous functions, though it indeed has limitations compared to other languages - other useful functionality in stdlib such as the functools, itertools, and operators modules - some built in immutable data types, such as str (strings), bytes (byte-strings), tuples, frozensets You can read more here: https://docs.python.org/3/howto/functional.html https://docs.python.org/3/howto/functional.html [1] http://www.artima.com/weblogs/viewpost.jsp?thread=98196 http://www.artima.com/weblogs/viewpost.jsp?thread=98196
- cwyers 11y agoThe major one you list is an advantage of the runtime, not the language. I don't see how NIH matters -- if C# is good, why does it matter that Microsoft built it because they couldn't control Java?