Citat:
Ursprungligen postat av
abcabc
Jag har noterat i Svenska wikipedia så står det att "Officiellt är språket baserat på C++", jag tycker det låter lite konstigt, nästan som ett skrivfel, då det så uppenbart är Java.
Just det påståendet har ju till och med en källhänvisning, och i den står att läsa:
Citat:
Hejlsberg: First of all, C# is not a Java clone. In the design of C#, we looked at a lot of languages. We looked at C++, we looked at Java, at Modula 2, C, and we looked at Smalltalk. There are just so many languages that have the same core ideas that we're interested in, such as deep object-orientation, object-simplification, and so on.
One of the key differences between C# and these other languages, particularly Java, is that we tried to stay much closer to C++ in our design. C# borrows most of its operators, keywords, and statements directly from C++. We have also kept a number of language features that Java dropped. Why are there no enums in Java, for example? I mean, what's the rationale for cutting those? Enums are clearly a meaningful concept in C++. We've preserved enums in C# and made them type-safe as well. In C#, enums are not just integers. They're actually strongly typed value types that derive from System.Enum in the .NET base-class library. An enum of type "foo" is not interchangeable with an enum of type "bar" without a cast. I think that's an important difference. We've also preserved operator overloading and type conversions. Our whole structure for name spaces is much closer to C++.
Vilket språk C# är mest likt kan ju givetvis diskuteras, men givet att en av huvudmännen bakom språket säger rakt ut att den primära inspirationskällan är C++, snarare än Java, så kan man nog utgå från att det i alla fall inte är ett
skrivfel från wikipedias sida.