4 ms·
C++ has got nothing to do with neither Java nor C#.
by shin_lao 17y ago
C++ 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.