4 ms·
I see C# as a linear improvement on Java. In my eyes, it looks like this: C++ --> Java --> C#
by icey 17y ago
I see C# as a linear improvement on Java. In my eyes, it looks like this:
C++ --> Java --> C#
- shin_lao 17y agoC++ has got nothing to do with neither Java nor C#.
- logicalmind 17y agoThe majority of Java/C# syntax was derived from C++. So I wouldn't say "nothing".
- rawr 17y agoAt least the OO parts. Of course the syntax was originally C.
- DrJokepu 17y agoThe C# ECMA Standard ( http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-334.pdf http://www.ecma-international.org/publications/files/ECMA-ST... ) mentions it several times that one of the main design goals of the C# language was familiarity to C++ programmers. Indeed C# borrowed a considerable portion of its syntax and keywords from C and C++. I suppose the same is true for Java as well.
- berntb 17y agoThe C# standards only mentions C/C++ and not Java?! >>Indeed C# borrowed a considerable portion of its syntax and keywords from C and C++. I suppose the same is true for Java as well. It seems really weird to me when you sound like C# was an independent development? I'm not an expert on either, but... Didn't Microsoft even try some (/a few?) Java-clone before C#? And then we have that "embrace and extend Java" thing Microsoft tried first. Is the ... hrm, inspiration... from Java in C# "the love that dare not speak its name"? :-)
- messel 17y agoha, I think so berntb.
- ido 17y ago> Didn't Microsoft even try some (/a few?) Java-clone before C#? J#[1]? J++[2]? [1] http://en.wikipedia.org/wiki/J_Sharp http://en.wikipedia.org/wiki/J_Sharp [2] http://en.wikipedia.org/wiki/Visual_J%2B%2B http://en.wikipedia.org/wiki/Visual_J%2B%2B
- berntb 17y agoThanks! Next time I'll just check this document linked from the J++ 'pedia page myself before asking. http://www.ecis.eu/documents/Finalversion_Consumerchoicepaper.pdf http://www.ecis.eu/documents/Finalversion_Consumerchoicepape... Page 16: Kill cross-platform Java by grow[ing] the polluted Java market. (Microsoft internal document.) Etc etc, with references. This document could be posted as a story on HN, if anyone wants lots of karma. :-) We can say one thing for certain -- the "love" here is criminal and violent...
- icey 17y agoI don't think you know your history very well: http://en.wikipedia.org/wiki/Java_%28software_platform%29#History http://en.wikipedia.org/wiki/Java_%28software_platform%29#Hi...
- shin_lao 17y agoBeing based on something doesn't mean it's like similar. Is C++ like Simula? My statement was probably poorly phrased, but what I meant is that a modern C++ program is nothing like a modern Java program. The approach are radically different. I'm thinking about what the heavy usage of templates in C++ allows, what you can accomplish in terms of generic programming. You can write in C++ like you would do in Java/C# but that would be pointless IMHO (complex hierarchy, virtual methods, etc. : exactly what I try to avoid). It's like saying lizards an birds are similar because they share a common ancestor (dinosaurs).
- sorbits 17y agoJava certainly evolved the OO parts of C++. C++ being a multi-paradigm language it does however have more than the OO stuff, and that “more” wasn’t inherited by Java. This “more” is things like operator overloading, templates, compile-time types (allowing implicit type construction and user type conversion operators), well-defined rules for automatic storage, etc. I rely heavily on these things and so does the IMHO elegant standard template library. I rarely use the OO features of C++ (if we define OO as inheritance and polymorphism, I do of course use data abstraction). I assume the parent is doing something similar, which is what makes him say that Java/C# has nothing to do with C++, as there was a crossroad a decade ago where a lot of C++ users moved away from object oriented programming and instead embraced generic programming.
- messel 17y agoOut of curiousity icey, where would these languages fall on your chart: ruby on rails? scala? python? I'm attempting to "download" web programming languages in an exceptionally short time but I'd prefer focusing on high end producers. I can see advantages and pains to various syntax and functionality, and have been fairly liberal in my choices so far to focus on existing libraries.
- stevecooperorg 17y agoFor me, they're different 'flavours' of programming and fit on a different chart. The C++/Java/C# line is for static programming with heavy reliance on a compiler -- the idea is that the compiler helps you find lots of errors. In all three languages, getting the program to compile rules out whole rafts of problems. Python and Ruby move that responsibility onto tests -- you run the code to find errors. I think C++/Java/C# fit onto a line, each taking away accidental complexity and adding higher level features. C# iterators and lambdas are a good example the OP mentions, of a high-level feature that makes possible styles not available in Java and C++. (we use C# iterators and lambdas to write in a more functional style than we could in Java)
- icey 17y agoMy "daily drivers" are C# and Python. I'm picking up Clojure right now, but haven't really done much with it - I really like lisps in general, but for some reason always fall back to either C# or Python when I need to write something I'm going to maintain. If I were in your shoes, I would start with Python and Django. It's a good framework on a good language, and most importantly, Django has a very good community and almost peerless documentation that's available for free online. Ruby on Rails is also quite nice, I'm just not a big Ruby fan. There is no reason for this other than personal preference. Scala seems very interesting, but I personally don't see a gain in learning it (since I have C# in my toolbox). Your mileage may vary. For whatever it's worth, everyone I've dealt with seems to have had a pretty painless transition from C++ to C#. I am not a Java person, so I can't really speak to that.
- known 17y agodata types < data structures < design patterns