3 ms·
> C# is awesome. I think it's a spectacular language. OCaml, Haskell and Lisp are spectacular. Erlang is spectacular. Tcl and Python are spectacular. C# is an
by dozzie 11y ago
> C# is awesome. I think it's a spectacular language.
OCaml, Haskell and Lisp are spectacular. Erlang is spectacular. Tcl and Python
are spectacular. C# is an OK-language at best.
> I'm not aware of any non-Java JVM languages prior to the CLR [...]
Except JVM/Java had JPython, JRuby, and Rhino (JavaScript) earlier. Those are
interpreted, sure, but they were running inside JVM and talking to Java code
already when .NET was first published. The compilation to JVM bytecode is
a minor implementation detail.
- V-2 11y agoWhat 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?
- pascalmemories 11y agoUCSD Pascal used the p-machine to be machine/architecture independent. All the way back in 1978. [edit: a quick google suggests the p-machine was based on original work circa. 1966] While not the JVM, using a virtual processor setup as a target for portability was a really old concept by the time Java or the .NET CLR came along. Newer approaches add new concepts or take advantage of new technologies, but it's never revolutionary.
- aggieben 11y ago> OCaml, Haskell and Lisp are spectacular. Erlang is spectacular. Tcl and Python are spectacular. C# is an OK-language at best. I don't agree. In my view, Lisp is spectacular for its unified meta-programming capabilities, and C# is spectacular for its expressiveness (and rapid improvements, which really has more to do with the C# team than the language per se, I suppose). The rest are what they are, better than others at some things, but not spectacular.
- sspiff 11y agoGNU Kawa (Scheme on Java) had its first public release I can find in 1998, with version 1.6. It compiles to Java bytecode since version 0.2, and is now at 2.0, and still actively maintained by the same single developer as far as I can tell. It's pretty impressive, despite not being widely known.
- cartoonfoxes 11y agoWhen you say Python is spectacular do you mean the language itself, or the language + libraries. Only Python 3, or 2 as well. While I've successfully used it for a few projects, I find Python the language to be a bit underwhelming.
- noblethrasher 11y ago> OCaml, Haskell and Lisp are spectacular. Erlang is spectacular. Tcl and Python are spectacular. C# is an OK-language at best. C# not only has built-in monad comprehensions, it can straightforwardly simulate type classes/traits (which even F# can't do). It also has a full metaobject protocol for handling (extreme) late binding, and a good concurrency story (though I rather prefer the Actor Model). Really, C# only pretends to be a blue-collar language.
- masklinn 11y ago> C# not only has built-in monad comprehensions IIRC linq is just a structural transformation. Most languages can define monadic instances, that's not the difficulty (or the value) > it can straightforwardly simulate type classes Without HKT? > it can straightforwardly simulate traits by copy/pasting extension methods? > It also has a full metaobject protocol you can change the inheritance tree of a C# object at runtime?