Hacker News new | past | comments | ask | show | jobs | submit login

C++ has got nothing to do with neither Java nor C#.



The C# ECMA Standard ( 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.


The 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"? :-)


> Didn't Microsoft even try some (/a few?) Java-clone before C#?

J#[1]? J++[2]?

[1] http://en.wikipedia.org/wiki/J_Sharp

[2] http://en.wikipedia.org/wiki/Visual_J%2B%2B


Thanks! Next time I'll just check this document linked from the J++ 'pedia page myself before asking.

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...


ha, I think so berntb.


Java 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.


I don't think you know your history very well:

http://en.wikipedia.org/wiki/Java_%28software_platform%29#Hi...


Being 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).


The majority of Java/C# syntax was derived from C++. So I wouldn't say "nothing".


At least the OO parts. Of course the syntax was originally C.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: