Jump to content

Talk:C Sharp (programming language)/Archive 1

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by MiszaBot I (talk | contribs) at 02:32, 20 July 2010 (Archiving 25 thread(s) from Talk:C Sharp (programming language). (ARCHIVE FULL)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Archive 1Archive 2Archive 3

Template:Archivenav

The links added to this article (and indeed all development topics) must be encyclopedic in the sense that they provide valuable context to the article at hand. C# is no exception. Otherwise the External links section would end up being a repository for everyone's pet C# development website. So if you're wondering why your link was removed, that's why. This is no different from any other WP topic that deals with popular things that have relatively large web coverage like Pokemon or iPod accessories. -- klaus

I object to the use of the term "spam" for a site one does not think belongs on the external links list of a certain page. It is derogatory and inflammatory. I would like to understand the sysyem. What is the justification for having the C# compilers and Mono project links here?
---71.252.197.197
I'd object to the term "spam" as well, belive me. I understand there is no commercial gain here whatsoever. I don't think anyone is accusing you of that (well, I'm not). But that's what it's called for some reason, "link spam". I guess it's an unfortunate label. BTW, for the guide on external linking see Wikipedia:External links. In the case of your site for example, I simply don't see any uniqueness factor that would justify including the link. The C# and Mono compilers are here because they are "encyclopedic" in that they refer directly to the topic at hand. -- klaus
You might want to read Wikipedia's guidelines on external links in order to understand what should and should not be linked. Also this section on how not to be a spammer. If your only reason for participating in Wikipedia is to add external links, then you probably shouldn't bother, as Wikipedia is not a link farm. But if you'd like to contribute content, that would be welcome. --Craig Stuntz 16:08, 28 July 2006 (UTC)

Politics, patents, open-ness

Hi, regarding the following statements:

  • "However, that standard library provided with C#, including the extensive GUI library, is not an open or completely documented [library], ..."
    • C# and the .NET libaries upon which it is based are open. You're referring to the implementation as provided by one arbitrary company. You cannot judge that and say it's the same as C# itself. You might as well be saying that C# includes Gtk# if you say that it includes WinForms.
    • Whether third parties (i.e., not the standards bodies themselves) release closed-source libraries implemented in .NET is immaterial to the language's inherent openness. Although it may be worthwhile to mention in a neutral way, I believe this section violates NPOV in its judgment of C# (which is standardized by the ECMA and ISO), based on the actions of one company. For instance, if some rival company decided to come up with a Gtk# or WinForms competitor that was closed source and internally undocumented, it would still not be an argument against C#/.NET as an open development platform. C# is open; it is a matter of course that not all things written with it will be also.
  • "so an independant implementation which can run all programs written for Microsoft's C# would be difficult"
    • This is true; however, that is not a correct standard by which we should judge C#. Microsoft developed C#, this is true, but submitted the language and its core libraries for standardization by the independent bodies ECMA and ISO. As I mention above, it is not NPOV to judge the language and its standardized libaries on the basis that one company has released undocumented, closed-source libraries.
    • For example, Microsoft has also released a plethora of libraries written in C++, such as MFC. It is likewise not an argument against C++ (nor is it even worth mentioning) that some company (Microsoft) has written a closed library (MFC) available in C++.
  • "and of questionable legal basis (see discussion about Mono)."
    • This is not true. The legal basis is firmly established. The ISO standards body requires that all standards ratified are free of restricting patents; that is, any standard approved by the ISO may be implemented without fear of patent protections. This is true of the C# language and .NET platform. The Mono website itself (an independent, open-source .NET and C# implementation) states:
      • "The core of the .NET Framework, and what has been patented by Microsoft falls under the ECMA/ISO submission. Jim Miller at Microsoft has made a statement on the patents covering ISO/ECMA, (he is one of the inventors listed in the patent) ... Basically a grant is given to anyone who want to implement those components for free and for any purpose."
    • Even if this were not true, the terms of ISO require free implementation, as I mentioned earlier.
    • It may be the case that WinForms is covered by some patents. However, as discussed above this is not relevant to the discussion of C# itself. If any company released any library covered by patents targeted at .NET, is this worth mentioning in a discussion on C#? I say no, it is not.
    • It is very important to be clear that C# and .NET are standards defined by ISO and ECMA, and no one else. What other companies do, in terms of the proprietary libraries they release or the patents they own on their own libaries, cannot be used fairly as a criticism of C#.
    • If you look at most of the recent standards published by the ECMA and ISO, you will see that the majority of them have been developed by single companies or coalitions of companies. For example, the famous language JavaScript (more correctly named ECMAScript) was developed by Netscape Communications. It became standardized and now is under development by many companies. There is even a JavaScript implementation for .NET. Once a technology becomes standardized, it is irrelevant who originated it. Does it matter that the unit of energy, the Joule was named after and developed by James Prescott Joule? No. It's a standard now, and when you're talking about Joules, you're referring to the SI unit. Microsoft in this situation does not pretend that WinForms and similar libraries are part of the .NET framework standards. They are independent libraries published independently, and one cannot judge the C#, as standardized (which is what this article is about!) based upon them.
    • Please respond, as I believe article violates NPOV.
    • Xiphoris 22:42, 12 June 2006 (UTC)
I didn't write this so I won't defend it, but I'll point out that this seems to me to be yet another manifestation of the very common confusion between C# in particular and .NET in general. There are large parts of MS's .NET framework implementation which are not based on any standard, whereas C# is completely standardized as are the parts of the framework on which it relies. The article could probably do a better job of clarifying this general difference between C# and .NET, especially now that ".NET 3.0" will be shipping with C# 2.0 during C# 3.0's development, or so it appears. --Craig Stuntz 02:39, 13 June 2006 (UTC)
I would go further and say that C# per se has nothing to do with the .NET framework or the BCL. Quoting from the ECMA spec, "Although Microsoft’s implementation of C# relies on CLI for library and runtime support, other implementations of C# need not, provided they support an alternate way of getting at the minimum CLI features required by this C# standard."
Furthermore, C#'s actual requirements of a library are quite modest,and are detailed in the spec's "Annex D. Standard Library". This covers certain required exception classes, array members, interfaces for enumeration, and base data types such as int.
With that in mind, it's clear that much of this article's content is off-topic. I/O classes, garbage collection, and reflection, to name a few, are not a part of C#. Neither is MIDL, for that matter. We need to make this much clearer, probably by creating a different topic, named something like "C# Programming in the .NET framework". Leotohill 04:37, 13 June 2006 (UTC)
I think we have to discuss the standard library that Microsoft provide. That is what most people will think of when they think about C#, and what most books discuss. Mrjeff 21:25, 14 June 2006 (UTC)
On the contrary, I think we need to emphasize the difference. People are already badly confused about this, and it's only going to get worse when MS releases ".NET 3.0" containing and built with the C# 2.0 compiler, with C# 3.0 to follow later on. Furthermore, a discussion of the framework is no more or less relevant for any other .NET-compatible language. For example, one of the key features of .NET generic classes which separate them from C++ templates is that they are language-independent. Understanding the difference between C# and the .NET framework is in my opinion a critical point of understanding. We can and should discuss the libraries in other articles, however, and we can link to them here. --Craig Stuntz 16:47, 15 June 2006 (UTC)
Craig has hit the nail on the head. It makes no sense to discuss garbage collection, reflection, I/O, and such as if they were attributes of C#, when in fact the exact same things could be said of any .NET programming language that uses the .NET framework. Proper links between the topics is the way to go. Leotohill 17:51, 15 June 2006 (UTC)
I agree. BTW, This is fun, you guys. I'm enjoying collaborating with all of you to improve this article. There are some links between the CLI/CLR and the C# language; I will do some research and see if I can establish what the relationships are between them :) Xiphoris 08:51, 20 June 2006 (UTC)

I am troubled, under this same heading, by a remark made in the opening paragraph describing C#:

  • "C# has a procedural, object-oriented syntax based on C++..."
When one reviews the Java programming language topic, one doesn't see the reference to Java being a "procedural" language at all - and rightly so, in my view. Knowing both, as I do, but perhaps lacking the academic background to judge this empirically as another academic reading this might, I have to ask why C#, as distinguished from Java, would be defined or characterized as 'procedural' whereas Java is not? If there's no sound rationale for describing C# as such, I reccomend deletion of the terms 'procedural' and 'procedure-based' in referring to C# throughout the article. ross613 19:24, 25 January 2007 (UTC)

Regarding references to VB.NET

Gaijin42 added the following to the section on managed memory:

"C# and VB.net provide explicit control of unmanaged resources, such as database connections, ... (IDisposable stuff)"

I don't feel that mentioning VB.NET here serves a purpose. C# provides such things only because it's a .NET language, and all .NET languages support the same IDisposable interface. There's no more reason to mention VB.NET than there is, say, IronPython or JavaScript.NET (yes, there is JavaScript.NET). I think the most correct thing might be to say that .NET provides that feature, but since this is an article on C# it's reasonable to say that C# provides that feature; it's OK to leave it unstated that it's actually provided through .NET, which C# sits on top of. In any case, there's no specific reason to mention VB.NET here, as this is an article on C#. I recommend we remove this reference. It might be more relevant to include it in the article comparing C# and VB, or perhaps in a section of this article comparing it to other languages, but not here.

Gaijin42, I support the notion of an article comparing VB to C#; however, do you think we could expand it to include all major .NET languages (not toy ones)? Also, was there a reason to mention VB.NET here that I didn't notice?

Xiphoris 03:32, 9 June 2006 (UTC)

Received no response. Removing unnecessary references to VB.
Xiphoris 22:51, 12 June 2006 (UTC)
Hmmm, I'm still not happy with the page. The article mentions C++ a number of times as a basis of comparison for language features. Does anyone have an idea how to clearly describe such features without unnecessarily referring to other languages, such as C++?
Xiphoris 22:54, 12 June 2006 (UTC)

This article needs to be cleaned up

When I have time over the next couple of days, I'm going to try to clean this article up. The article contains both poorly worded sentences and phrases as well as plainly counterfactual statements. Here's an example:

In languages that do not provide garbage collection, the programmer must explicitly free all allocated memory. Failure to do so is a common program bug, resulting in a memory leak, where the program continues to allocate more and more memory to itself.

That's not what a memory leak is.

I am not the best writer in the world, so any help improving the phrasing of my additions is appreciated. However, I would request that people make suggestions about rephrasing here and allow me to rephrase my own sentences instead of making the changes yourself. Thanks! —Xiphoris 05:23, 5 June 2006 (UTC)

Xiphoris, please provide here an alternate definition of a memory leak that you find acceptable.
The part that I had issue with was this, mostly because of the low quality and lack of clarity:
"Failure to do so is a common program bug, resulting in a memory leak, where the program continues to allocate more and more memory to itself."
The language "continues to allocate more and more memory to itself" isn't technical language. Plus, it has nothing to do with a memory leak. Whether the program continues to allocate memory is immaterial -- all it needs to do is allocate one object and lose track of it for a leak to occur.
Also, specifically, a memory leak is not when a program does not free memory, it's when it cannot. The issue of whether some allocated object is a memory leak is an issue, to use technical language, of reachability. Specifically speaking, all reachable objects are not leaked; all leaked objects are unreachable. A program only leaks memory if it loses track of something it has allocated. For example,
int* i = new int();
i = 0; // lost the integer allocated with new
If the program still has access to the object and has the ability to deallocate it, it is not a memory leak. Indeed, if the program still has access to the object, it can still potentially use that object. The only way to say for sure that some object has been leaked is when you know that the program no longer has the ability to deallocate it.
You have a very orthodox definition of memory leak. Nothing wrong with that - I'm just accustomed to a more liberal one. My definition encompasses programs that could release the memory, but do not. For example, consider a program that keeps some session state based on a an http seesion id. It has a data structure (e.g., Hashtable) that is indexed by sessionId. This poorly written program does not remove the entry from the table when a session ends. No functional harm is done, but the memory associated with that session state is retained. So, if 1,000 users login and logout, the program has retained the session state of all 1,000, even though none are logged in any more. I'd call that a memory leak. Note that my definition allows for the existence of memory leaks in GC environments, while yours does not. GC eliminates one cause of leaks, but not all. I think my description is consistent with Memory leak.
I agree that my one-sentence description in the article is neither technical nor complete. It is non-technical on purpose: as far as possible within context, I try to make an article understandable by the non-specialist reader. (In this case, though, I'm tilting at windmills, because I've inserted my non-technical description inside a big pile of jargon written by others.) But even if not complete, I think the statement works well. In particular, in this article I would not bother to cover the case of the memory leak that is unnoticed. But when choosing between a simple example of a leak that does not cover all cases, and the complete description that does, I'd favor the former, and refer to Memory leak for the full definition.
My definition encompasses programs that could release the memory, but do not.
That's what GC is, isn't it? Apart from the notion of automatically tracking memory, GC systems don't instantly free it (like refcounting systtems would). They can release the memory but do not. I don't think that's a good definition of memory leaks, therefore.
Note that my definition allows for the existence of memory leaks in GC environments, while yours does not. GC eliminates one cause of leaks, but not all.
But the causes of memory leaks in GC environments almost never have to do with allocation of memory. Instead, they're "conceptual" leaks (that really have nothing to do with memory allocation) like failing to close a file or socket. (The resources are not actually 'leaked' per se; they're just closed a long time after the object is last used). Whether you consider such things memory leaks is a matter of definition; maybe I'll be picky and call them 'resource leaks' :)
But even if not complete, I think the statement works well. In particular, in this article I would not bother to cover the case of the memory leak that is unnoticed. But when choosing between a simple example of a leak that does not cover all cases, and the complete description that does, I'd favor the former, and refer to Memory leak for the full definition.
The problem I had with the existing definition was the part about "continuing to allocate memory into itself". I think the definition would be fine if we simply mentioned that programs allocate memory but don't free it, and how/why GC prevents this.
Xiphoris 02:05, 13 June 2006 (UTC)
That's what GC is, isn't it?
No - the difference is that GC eventually releases memory when it is appropriate to do so , and a memory leak is when a program doesn't release memory when it would be appropriate to do so. So I'd say that a memory leak is when a program should release memory, but doesn't. Sometimes it doesn't because it can't (as in your example) and sometimes it doesn't because it's stupid (as in mine).
That said, the current wording with the "more and more" removed is fine. Nice to hash it out with you.
Leotohill 04:48, 13 June 2006 (UTC)


Although your definition of memory leak is arguably more correct, it is less useful. After all, if a program has a memory leak, but nobody notices, who cares? The only memory leaks of consequence are those that cause excessive memory use.


Xiphoris 20:57, 9 June 2006 (UTC)
Also, I don't agree with your change of "object" to "component". I've never heard of a "component-oriented language". What are the characteristics of such a language? Why is that a better description of C# than "object-oriented"? Leotohill 12:15, 5 June 2006 (UTC)
Sorry, now I see that you have introduced a talk section on component OP. I'll place some comments there.


Continuing the list on needed clean-ups, the following statement is unaccurate:

C# supports a strict boolean type, bool. Statements that take conditions, such as while and if, require an expression of a boolean type. While C and C++ also have a boolean type (...)

C does not have a native boolean type (although a type "bool" or "boolean" is defined by many libraries), and conditions for if/for/while statements must be of "arithmetic or pointer type", according to K&R second edition. I had edited this myself, rephrasing the statement, but edited back since I felt someone might do it better. 201.67.28.37 05:35, 10 October 2007 (UTC)

C has a native boolean type (_Bool) since C99. -- int19h 06:26, 10 October 2007 (UTC)

Component-oriented programming

It is more specific to say that C# is a component-oriented language because the principle division of elements of the system is the component, which is a portable, self-contained set of functionality. .NET implements this notion as an assembly. Depending on your perspective, component-oriented programming may be either a subset or superset of object-oriented programming. However, a number of C#'s features are specifically component-oriented (such as delegates) and I believe it is more accurate to describe the language this way. In case users are interested, I have specific industry experience related to this language. I have been a programmer of many languages for many years, and have extensive experience in many of them. Nevertheless, I have corporate affiliation of a sort that some users might use to argue that I am biased. I do see myself as biased on many issues, but programming languages is not one of them. I believe I can factually evaluate the pros and cons of this language, and others, despite my industry affiliation. I invite those who are interested to read more about me on my user page. —Xiphoris 04:59, 5 June 2006 (UTC)

I disagree with the change. I see component-orientation as a aspect of a design of the artifacts produced by programming. It might be easier to produce components with one language, over another, but a language itself is not component-oriented. A language does not contain functionality, while a component does. If the assembly indicates that C# is component-oriented, then so is any .NET language, because all produce assemblies. Are you saying that VB.NET, COBOL, Python, and all the other languages that are implemented in .NET are component-oriented? Leotohill 12:37, 5 June 2006 (UTC)
A language does not necessarily have to be component-oriented or not; component oriented-programming can easily be enabled by a library as much as a language. For instance, non-CLI C++ can do component-oriented programming through use of COM. C++ has no component-oriented development features because it is unaware of ABIs -- compiled code of various compilers is often not able to interact with compiled code of other compilers; as a result libraries must often settle for the 'common denominator' of a C-like calling convetion. For example, if I write and compile a class in Borland C++, put it in a DLL file, I will not be able to instantiate and call that class using Visual C++. The reason I cannot do this is because the C++ language has no component-oriented features. But it is also possible for a language to specifically be aware of and empower component-oriented development.
I will agree that component-oriented programming refers to the way that compiled units interact with each other, not the way that code within the language interacts. However, it is possible for language features to facilitate the way that compiled units interact. For instance, C# has access keywords like public, private, and internal which go far beyond the semantic in C++; in C++, the notion of private completely disappears when code is compiled, and I can (using a pointer) modify a private variable from outside in a class; in C# though, the semantics of private aspects of components are enforced using the security model and simply cannot be accessed without a security bypass. In this case, the component-oriented access keywords of the language exist to facilitate the interactions of the compiled units.
C#'s compilation target is .NET, and many of the features it offers are congruent with .NET features. As a result, one can say that that language features that C# offers serve to provide component services to compilation units. The C# language feature private corresponds to much more than just what happens in the language, and that private designation can be seen by VisualBasic, IronPython, or any other .NET language. It is a component-oriented programming feature for that reason, in my opinion.
If those other .NET languages offer component services, such as the distinction between various access modifiers, then one could say that they are component-oriented. One critical piece of component-oriented programming is that components are self-describing; i.e., I don't need some "header file" or whatnot to use them -- all the relevant information is in the component itself.
Another critical feature of component-oriented development is the focus on interface implementation instead of class inheritance. Object-oriented programming literature generally discusses how GermanShepherd derives from Dog derives from Animal, and all of them have variously more complex definitions of EatFood(). OOP generally does not present the term interface, which is a completely implementation-free contract. In component-oriented development, the essential form of contract is the interface, inheritance from which has very different semantics than class inheritance. COP and C# generally discourage class inheritance in favor of interface inheritance in all but a very few circumstances. Indeed, the .NET class library only does it rarely, but uses interface inheritance frequently.
Since you are new to the term, I thought I might provide some resources for you to read about component-oriented programming so that we may discuss this issue effectively.
  1. http://en.wikipedia.org/wiki/Software_componentry - Section titled "Differences from object-oriented programming"
  2. http://www.amazon.com/gp/product/0596102070/sr=8-1/qid=1149576405/ref=pd_bbs_1/102-5591093-9912923?%5Fencoding=UTF8 -- the book "Programming .NET Components" is one of the best books I've read on .NET, and it covers the essential points of what it means to make a component and how to do it well. If you're a .NET programmer I would highly recommend this book. It's possibly the best programming book I've ever read. (Every other book I've read spends tons of time telling me things I already know, like what a for loop means. This book dives right in act exactly the level of sophistication I want on the subjects that are in the book.)
  3. [Aspect-oriented programming is a very different but related concept, in that it may either be implemented in a language itself or with support libraries. There are libaries such as called Aspect# which allow aspect-oriented programming to be used in C# even though C# has no specific aspect-oriented features; but there are also programming languages that specifically include aspect-oriented features to make this process easier.
I see your points an am not 100% behind the edit I previously made. However, I do still believe it's right and see the point of this discussion about figuring out which way to introduce the language as being more beneficial. Perhaps I'll ask some people at work how they would prefer the language be described and report back. Anyway, let me know what you think!
Xiphoris 06:55, 6 June 2006 (UTC)


good points, but still not enough to convince me that the designation is appropriate. If anything, your arguments apply to the .NET platform more than to C# in particular. And then there's a language like Powerbuilder, which has private class members, and events, and self-describing modules. Have others publicly described C# as a COL? Is the designation in any way becoming popular? We don't want to be creating controversial new designations on WP. If it were very clearly a better designation I might go for it, but it's not so clear to me. Leotohill 01:03, 7 June 2006 (UTC)
OK, I've reverted component-oriented to object-oriented. I'll revisit this topic sometime in the future once there is better, or at least more public, evidence supporting the ocmponent-oriented designation. Thanks for the interesting discussion.
Xiphoris 03:21, 9 June 2006 (UTC)

Compiled (JITted) Code Cache and ngen.exe

From the article:

"The resulting binary code is stored temporarily (in a memory cache), so if the program uses that portion of code again, the cached version is used. However this is only in effect during the runtime of the program. If a .NET application is run again, this compilation process is done again."

I happen to know that certain libraries and executables are compiled to native code and stored in some sort of cache on the hard drive under some conditions. ngen.exe is part of the procedure that makes this possible. Someone (or myself) should do the research to make the necessary corrections to the article.

Samrolken 09:53, 18 Jan 2004 (UTC)

Actually, this is technically incorrect. I am pretty sure that the object code is usually written to disk, but I might be wrong. Certain run-time optimizations may prevent this, I am not sure.

In .Net object code is normaly never writen to disk, JIT compile it when needed and that's all (So the MSIL->x86 compilation appends for every launch) but that's true that you could ngen your assemblies and then the object code will be used)
The standard practice is what do microsoft : using ngen to generate native assemblies during the setup of the program
Virtualblackfox 28 June 2005 21:57 (UTC)

Complete Hash

Certain cynics have suggested that C# should be pronounced complete hash.

See-Pound is also sometimes used (by me, at least!). -mhr 07:09, 18 Nov 2003 (UTC)
Cynics of nearly everything have alternate pronunciations/spellings for products they wish to jeer. Point? Samrolken 09:53, 18 Jan 2004 (UTC)
To add a reference to the whole "C-Hash" thing, I give the infamous TheRegiter's take on it all: [1] they also have some opinions of readers on the issue: [2] and yes, it's all very cynical. But hey I've pronounced it 'C Hash' since before I knew how it was supposed to be pronounced, and I still do out of my cynicism. - SHayter 23:43, 20 August 2006 (UTC)

Is C# Just a Java Clone?

Many sources say that C# is more or less a copy of Java with some minor changes / enhancements. Could somebody elaborate on this please? 213.3.87.59 02:26 30 Dec 2002 (UTC)
C# has many of the same features as Java, but also has some noticeable differences. It is obvious that the C# designers used a lot of concepts from Java, but they took some from C++ as well.
The big differences are in the actual class heirarchies and actual executable representation. Java has a big set of base classes, as does C#. But Java's and C#'s class libraries bear little resemblance to one another.
A Java executable contains byte-code which must be executed via a Java Virtual Machine (JVM). Similarly, C# executables contain MSIL which must be JITted via the .NET framework (or the CLR). The JVM converts byte code into binary code as it is executed. The binary output of C# code is cached and used again if the program uses that part of the code again. So C# may be faster in execution since it caches the binary code and most JVM's do not.
Critics state that C# is MS's attempt to kill Java. Who knows if this is true, but the reality is that C# fixed and added a lot of features that Java excluded. Java still has its place as does C# now.
Feel free to include any of this information in the article as you see fit.
Frecklefoot 20:43 9 Jul 2003 (UTC)
I think beginners are helped if there is a clear distinction made between programming languages, used to express a programming idea, and the mechanisms supplied to interpret that language. Is it really true that C# programs will only ever be interpreted by the .NET framework? AJim 18:57, 15 Apr 2004 (UTC)
Well, that Microsoft's plan. They plan to install the .NET Framework on all future versions of their operating systems (the MSIL is "portable" in this manner), but I don't think they'll stop anyone who wants to write their own version of the CLR for a different OS. Being Microsoft, they'll just change it so often that it will be impossible to keep it as up to date as the Windows CLR. Why do you ask? —Frecklefoot 19:09, Apr 15, 2004 (UTC)
Java And C-Sharp Compared has a pretty good comparison of the two languages. - Bevo 20:45, 15 Apr 2004 (UTC)
There is a lot of politics here, no question. Microsoft is Microsoft. Windows needed a new development platform. A Java-like language with a supporting runtime was a natural choice - it was popular, easier to program (in some ways) than C/C++, and could cleanly support multiple languages, even multilanguage projects.
If Java was open source, Microsoft wouldn't be able to touch it. Java is corporate sponsored by Sun, which has been a clear enemy of Microsoft (in the 90's the CEO was very vocal about MS). So Microsoft could not invest in Java without giving huge credibility and control to Sun. Even then, Java and a JVM alone would not unify the platform the same way .NET does. The natural choice was to make a similar language, C#, and a new runtime (CLR).
Dude, sign your posts. :-) Use ~~~ or ~~~~ (the latter timestamps your signature, like mine). Frecklefoot | Talk 15:41, Jul 6, 2004 (UTC)
C# is hardly a Java clone. One could claim that Java is a C++ clone, ad infitum if you wanted to start equivocating wildly. C# has had from the beginning strong Java influences, yes, but not a clone. C# retains the concept of pointers, enumerations (just added in J2SE5... wtf, they skipped 3.5 numbers!), event handling (it is a "first class citizen" in the language, so to speak), operator overloading (Java needs this to be a better OO language, IMO), the foreach loop, and others. Moreover, IMO, C# has the right amount of verboseness, having programmed in both Java and C# extensively, I say it is smarter to write "bool" rather than "boolean".
I don't think Java, or any other language for that matter, needs operator overloading to be a better OO language. After all, it's just syntactic sugar for method calls. In fact, I think Java needs to get rid of the way you can call static methods via instance references to be a better OO language. JIP | Talk 07:40, 21 Apr 2005 (UTC)
Syntactic sugar? Come on! It makes statements a lot more readable... someClass + someInt is more readable (and more concise) than someClass.toInt() + someInt. DoomBringer 01:21, 1 Jun 2005 (UTC)
Syntactic sugar does mean enchanced readability. Avoid the features like pointers and enumerations (which are not C++ - deriviations) and you get a pure Java OOP source code compiled into Java bytecode. C++ source code looks completely different and is unservicable/unrecognisable/unmanagable by intelligent IDEs. --Javalenok 15:43, 13 June 2006 (UTC)
Just wanted to agree with the last reply - C# is FAR from a Java clone. It is somewhat similar syntactically but the fact that it's part of the CLR makes it a different animal entirely, not to mention some other miscellaneous (but major) differences such as switching on strings being allowed (and optimized to a hashtable behind the scenes when advantageous), the absence of checked exceptions (a very deliberate omission by the C# team), and allowing pointers a la C++ (as the previous posted mentioned) in "unsafe" mode. In fact, I think these differences are very important and relevant and should be included in the article. Overall C# is a very simple, uncluttered, and I would say beautiful language. One can't truly appreciate it (and will probably instead attack it for being a brainchild of the evil Microsoft) until one has used it. --WayneMokane 07:57, 19 Dec 2004 (UTC)
Adopting "programming with potinters" concept into Java does not kill its spirit, neither make it c++ deriviateve (there is a bunch of languages besides C supporting the pointers). Both language synthax, Javadoc, all the libs starting from the root Object class, GC, exceptions, bytecode VM - everything is stolen. The most considerable difference, the Microsoft's inventation, is getting money from developers for pinning your application users at their commertial platform. Actually, this behaviour is not an attempt to kill the Sun-Java, it is not a revenge - Microsoft just did not have such a tool for effective application development. Microsoft was forced to make a clone to prevent the drift of developers and users from the Windows on the Java platform. Not only C# is clone of Java - the whole .Net is a clone of Java platform.--Javalenok 15:29, 20 January 2006 (UTC)
Hmmm... following this logic Java and C# are both clones of Smalltalk. I Think we can agree that they are not that, at least. Hogan 23:37, 28 April 2006 (UTC)
It's more or less Microsoft's response to losing that lawsuit from Sun. They took MS-Java and removed the OS-compatibility, then kept the same syntax and structures that Java uses. Perhaps a section refering to the similarities should be made?
Even if it is based on a different framework, the syntax of C# is very similar to Java, so actually programming in C# isn't much different than Java/J#. Having had some experience in Java and J#, learning C# was very easy. --71.227.190.111 15:30, 14 July 2006 (UTC)

When it comes to C# and .NET specifically, if you take a step back they bear a striking resemblance to Java:

  • Bytecode (yes, MSIL is bytecode).
  • JIT.
  • Monolithic support class library
  • Cross-platform in theory as designed by Microsoft, and in practice as implementod by Mono and DotGNU.

But it does support things that Java doesn't:

  • Delegates, aka function pointers.
  • Real properties (although this could be implemented in the Java language as syntactic sugar for getters and setters).
  • Tighter control of element overriding.
  • Stack objects aka structs.

This is by no means an exhaustive list. While I do think that .NET copied a lot of the design of Java, it's equally obvious that they put a lot of thought into the things that they changed/added and didn't just "copy Java." --Chris (talk) 16:08, 14 July 2006 (UTC)

They tried to "just 'copy Java'" (J++) and Sun beat them in court. Hence, C#: the I-can't-believe-it's-not-Java. --70.104.16.183 17:47, 18 October 2006 (UTC)

Delphi's Influence

C#'s chief architect is Anders Hejlsberg, the brains behind Turbo Pascal and arguably the main brain behind Delphi. The similarities between C# and Delphi are striking to anyone familiar with both languages. This point deserves a bit of expansion, I think: you can't grok C# if you only think about Java and C++, because a lot of the stuff that's alien to both is part of Delphi.

Quite true. C# addresses a number of problems and annoyances that are found in C++, much more so than Java did. I can certainly see the Delphi influence in C#, although It's probably more obvious in the IDE than in the language itself. C# also takes programming languages a step beyond existing languages with the concept of attributes. --69.5.156.155 5 July 2005 13:35 (UTC)
I'd have to agrue that point -- most people would say that attributes take the language back a step to C or ASM. Attributes while having a nice OO sounding name slap the face of OO programming. Attributes (while nice feature) are really just (user programmable) pragmas or macros. Hogan 23:41, 28 April 2006 (UTC)
This is not true. Only some uses of attributes result in them being similar to macros and pragmas. One use you're thinking is probably something like [Deprecated]. However, there are a number of other things that one can do with attributes. For example, they're available at runtime via reflection -- that's nothing like macros or pragma. They're used in very interesting and powerful ways within the .NET framework, ways which have a non-obvious OO equivalent. Take a look at XmlSerializer for example.
Xiphoris 01:56, 13 June 2006 (UTC)

Paragraph Too Technical

The following paragraph needs elaboration (better language, more context, eg. comparsion with Java JIT compilers which have been around for some years now; language too technical. From a user point of view it is important too know if the programs are as slow as Java programs or not.)

The verb to jit is not generally known.  ;-)

When the program is executed, the .NET framework JITs the intermediate code into machine language as it is run. The JITting is very fast and is not noticeable on most modern PCs. As different parts of the program are used, they are JITted. Once JITted, that portion of the program does not need to be JITted again for that run (the program will use the JITted version). Each time a .NET application is run, it needs to be JITted in this fashion. Because the .NET applications require this JITting, only computers with the .NET framework can run .NET applications.

--Hirzel 13:07 9 Jul 2003 (UTC)

How's this?
When the program is executed, the .NET framework JITs the intermediate code into binary code as it is run. The JITting is very fast and is not noticeable on most modern PCs. As different parts of the program are used, they are JITted and the resulting binary code is cached. If the program uses that portion of code again, the cached binary version is used. Each time a .NET application is run, it needs to be JITted in this fashion. Because the .NET applications require this JITting, only computers with the .NET framework can run .NET applications.
I'm technical, so it's hard for me to see what is "too technical" about this paragraph (I wrote it originally). I included links for JIT which I realize is unfamiliar to many people. I'd appreciate someone unfamiliar with the field to take a swipe at it, but the whole JITting thing is pretty technical. I don't know if it can be made any easier to understand. But just because it's hard to grasp doesn't mean it shouldn't be included. I read TONS of stuff in Wikipedia that I don't understand. :-) —Frecklefoot 20:28 9 Jul 2003 (UTC)
I gave it a try. I avoided using the abreviation jit as a verb. I added two subtitles. It would be nice to have something about the syntax as well. --Hirzel 22:25 9 Jul 2003 (UTC)
The syntax is similar to both Java and C++. For example, in C++ you might use class.foo() or class->foo() depending on the situation. In Java and C#, you always use the dot notation (i.e. class.foo()).
C# also has a really nice feature called Properties. With a Property, you can get/set values in classes in a more familiar manner while still hiding information. Let me put this into plain English. In C++ or Java, to get or set a private member, you'd have to do this:
int foo = myClass.GetFoo();
myClass.SetFoo( foo );
However, with properties in C#, you can do this:
int foo = myClass.Foo;
myClass.Foo = foo;
It looks like you are setting and getting a public member, but in reality you are accessing the private instance of foo (notice capilization). The manner in which properties are declared in C# looks like this:
public class Bar
{ private int foo; ... public int Foo { get { return foo; } set { foo = value; } } ... }
Note the special keywords "get", "set" and "value". The example above just returns and sets the private member, but anything can be put into the get/set routines--they behave just like regular functions.
C# also won't allow you to directly access memory like you can in C++ (it is similar to Java in this manner). But you can access memory directly if you enclose the code in a block declared as "unsafe". If you do this, you, the programmer, are responsible for releasing any memory you allocate as the GC won't.
There are other differences, but these are the two big ones that come to mind. —Frecklefoot 14:25 10 Jul 2003 (UTC)

In our University we had a project- comparing of execution time of same applications(about 50 apps. of different types, sizes, etc.) writen in C# and J . not once J was faster and C# was faster 2-12 times!!!

C# to C#

I noticed Dysprosia changed all the instances of C# to C#. While I realize this would be correct for music notation, I have never seen C# written this way (even by Microsoft). If no one objects, I'll change it back to C#. Any objections?

Also, I changed the notation in the example from the K&R/Java style to the C++/C# style which is preferable for C# code. —Frecklefoot 14:19, 4 Aug 2003 (UTC)

No, wait, this is how MS themselves format it on the box...Dysprosia 03:56, 17 Nov 2003 (UTC)

Lookylooky [3] :) I suspect MS couldn't be bothered to always render C# as C#... Dysprosia 04:06, 17 Nov 2003 (UTC)

Microsoft marketing uses a logo that resembles ".net" but you'll find Microsft explictly states it's more corretly ".NET", so I expect C# versus C# is the same, but I haven't looked for the style/trademark guide that says so. — Mark Hurd 19:07, 17 Nov 2003 (UTC)

Perhaps it'll be best to sup the sharp once, and leave the rest. I don't know :) Dysprosia 10:11, 17 Nov 2003 (UTC)

I'm a total newb but I undid Nohats use of the proper sharp symbol mainly because it was showing up as a square in Internet Explorer and Opera. So I think the symbol used wasn't UTF-8 or something. Using a superscript version of the regular # seems to work best because it shouldn mess up searches too much. Pardon me if I goofed up, a newb still getting his bearings. Foofy 13:31, 1 August 2005 (UTC)

You were absolutely right about this, Foofy. The large majority of readers (more than 95%) will just see screwed up characters, not the intended character, regardless of which is more correct. Let's stick to # and think about our readers. Deco 18:52, 1 August 2005 (UTC)

C# is referred to as C# by ECMA, Microsoft and the vast majority of all the other sources. C# is shown on the logo (and that logo on the box) of C# but that is an artwork rather than an actual text reference. C# is C#. 213.46.246.133 20:06, 14 July 2006 (UTC)


Article name

See Talk:Microsoft Visual Studio‎. --Stefán Örvarr Sigmundsson 03:35, 27 October 2007 (UTC)

Version 3.0

The latest language specification of C# has already been publish so it's not a "future product" any more, is it? Shouldn't {{future product}} be removed? --Stefán Örvarr Sigmundsson 11:56, 15 November 2007 (UTC)

Is there any other providers rather than microsoft ? I mean Borland for example  A M M A R  22:27, 16 December 2007 (UTC)
No complete implemention, as far as I know. But does that really matter? Not only is the standard published but there is at least one implementation. Angus Lepper(T, C, D) 22:36, 16 December 2007 (UTC)
I found this link on Google , Borland C Sharp. I don't think Borland stand on the same standard , as well as Borland C++ .  A M M A R  20:31, 17 December 2007 (UTC)

What the hell?

There were pages and pages of discussion about this article, now all gone. Someone revert them back. grr (talk) 00:41, 20 November 2007 (UTC)

Hasn't the discussion simply been put into the archives? --Stefán Örvarr Sigmundsson (talk) 18:33, 20 November 2007 (UTC)

Disclaimer distinguishing 'C#' from 'MS Visual C#'

In this edit, User:Warren deleted this text: "This article describes the C# language as defined in the ECMA and ISO standards. For a description of Microsoft's implementation, see Microsoft Visual C#", saying "per WP:SELF, we shouldn't be discussing the article's contents, in the article".

Yet we have these two pieces of text just above: "The correct title of this article is C#. The substitution or omission of a # sign is because of technical restrictions.

This article is about the programming language. For the musical note, see C♯ (music)."

Assuming that we have agreement that the removed text correctly describes the purpose of this article, was it's main failing that it wasn't in italics? Also should it have been at the very top like the others?

I know that snippets like this often get created using WP templates, but I doubt if one exists that explains the difference between ECMA/ISO standards and MS implementations of such standards. I can see nothing but benefit from typing our own where necessary. --Nigelj (talk) 19:50, 17 December 2007 (UTC)

For what it's worth, in my opinion the text that was deleted was not in violation of WP:SELF. Read the standard. --RenniePet (talk) 21:20, 17 December 2007 (UTC)
Just my take on it: the disclaimer seemed a bit unnecessary to me. — Matt Crypto 21:33, 17 December 2007 (UTC)
OK, a bit more research and I think I understand it better now. The problem is mirror sites, who use WP articles under our splendid licence terms, but don't want their users bounced over to the real WP when they follow a link. (This doesn't happen with all normal wikilinks, so I don't know why the one in our paragraph would have been any different, but anyway...) So, it's not just being at the top, or being in italics, it's apparently about being a "non-WP-SUBST" template. Template:Selfref seems to be just the job, and seems designed for the case in hand. I tried using Template:Otheruses4, and it would have worked except that we want different text for the MS article than it's actual name (# vs sharp again), and that doesn't seem to be possible with that one. Phew. --Nigelj (talk) 22:52, 17 December 2007 (UTC)
though I made an edit that attempted to restore the text, I now agree with Matt Crypto and others that it doesn't belong there at all. The Implementations section covers it. —Preceding unsigned comment added by Leotohill (talkcontribs) 23:40, 17 December 2007 (UTC)
OK I'm happy with that too, after having seen the comment in true context. --Nigelj (talk) 21:48, 18 December 2007 (UTC)
For what it's worth, I probably would have objected to the edit if there was a solid article on the "differences between the standard and the Microsoft implementation", since most people landing on the article are probably going to be looking for that specific implementation. As it stands, the MS article, or any other article, is not really helpful in that regard... which was probably Matt's point. --Onstar (talk) 08:53, 21 December 2007 (UTC)

Criticism-Performance

This paragraph is a bit of a mess. It's a series of "because of this, except this, except this..." etc. In any case it is misdirected, because the performance concerns apply to all .NET languages, not just C#. (and Java as well. ) This is covered pretty well in .NET Framework (the "Disadvantages" section). I propose to replace the existing performance criticism with something resembling the text from the framework article (or just refer to that article.) Leotohill (talk) 03:24, 29 December 2007 (UTC)

I've made the change, I think it's an improvement, but it's been tagged "citation needed". I'd appreciate help on that. I really don't want to descend back into the many details of how a vm/managed architecture is usually slower, but isn't always, with discussions of bounds checking, type safety, machine independence, JITing, pre-JITing, optimizer efficiency, virtual method tables, garbage collection, yadda yadda. I'd like a suitable citation that doesn't require a lot of detail here. Anybody got one? Leotohill (talk) 23:18, 29 December 2007 (UTC)

I see that my claim about "more resources" is not obviously true to some. Perhaps I should have expanded it to say "more resources, including memory and infrastructure". Since .NET apps (as well as Java and most scripting languages) require multi-megabyte installs and environmental configuration, they clearly require more resources than, say, a fully self-contained C program. I also suspect that, for example, a "Hello world" console app in C# would require more runtime memory than the same app in c or, probably, c++. Performance comparisons are trickier, because of the many scenarios and considerations, and the parcity of published results from carefully-controlled tests. However, at a fundamental level it seems to me that a runtime that doesn't do type checking or bounds checking (for example) would allow completion of certain tasks in fewer cpu cycles that one that does.

Can someone suggest a phrasing that would be more acceptable that the one I tried? Leotohill (talk) 18:43, 30 December 2007 (UTC)

I thought the wording I saw was pretty good, primarily because of the "access more directly". I'd argue that, ipso facto, more direct access requires fewer resources—if its more direct, then no CPU time is needed to resolve indirection and no memory required to store references and suchlike. The question then is whether there is much by way of more direct access (which relies on the optimizations performed by the implementation at hand), and whether that gives any significant or meaningful performance boost. My informed understanding is that it varies, although it is often beaten by particularly well tuned programs written in lower-level languages. (although, equally, it can be easier to write a reasonably well-tuned program in C#—swings and roundabouts). That said, particularly given that it's cited, I think the current wording is okay. Angus Lepper(T, C, D) 00:09, 31 December 2007 (UTC)

I think that this section is not particularly "informing" on the matter: first of all I think that at least the fact that it's jitted it's worth mentioning, as this greatly increases performance compared to a VM language that doesn't use it (Java). Also "access machine resources more directly" means little, as it's not clear if you're speaking of peripherals, OS functions, memory or what. Since not even C is in fact self contained (it does need its library), and C++ has a similar number of jumps needed to access class members, it is reductive to say "it's not compiled into machine code, then it's slower"; in particular it's not objective to compare it to Java, whose performance is notoriously worse, both memory and speed wise. The "computer benchmarks game" link is also misleading in this context, as it shows the performance of the Mono implementation of C#, which is definitely slower than the official one. Overall it seems a slight anti-Microsoft bias in my opinion, or at least poorly certified. 78.13.141.225 (talk) 15:41, 14 May 2008 (UTC)


"C# CPU speed is also lower than for native languages" This cannot be what was intended -- the CPU speed is not related to source language. —Preceding unsigned comment added by 75.73.139.54 (talk) 03:18, 23 September 2008 (UTC)

The 22nd citation ("Microbenchmarking C++, C#, and Java: Average results without arithmetic.". Dr. Dobb's Journal (2005-07-01). Retrieved on 2007-12-29.) has 5 Java runtimes as the most performant and an ahead-of-time Java compiler at 6th. This proves that managed runtimes can be faster then native compilation. This is the exact opposite of what the citation is being used to back up, that managed runtimes are slower. The line should either be removed or changed to reflect that this is relating specifically to C# on Mono and .NET (which was slower in those benchmarks) and not Java or managed runtimes in general. —Preceding unsigned comment added by 219.76.243.32 (talk) 12:26, 20 January 2009 (UTC)

Platform criticism

Simple question: who is making that criticism? Because right now we aren't citing anyone making that criticism. If the editors who are insisting on including that criticism can't come up with a reliable source making that criticism, then it needs to come out. From WP:NOR: "...care should be taken to not "go beyond" what is expressed in the sources, nor use them in ways inconsistent with the intent of the source, such as using the information out of context". The only cited source is saying "hey we've created an implementation of c# for another platform" and does not criticise at all. AlistairMcMillan (talk) 16:08, 29 December 2007 (UTC)

Fantastic, now we are citing Microsoft for the platform criticism. I haven't read the linked article, but somehow I doubt that Microsoft are criticising C# for being Windows-centric. AlistairMcMillan (talk) 16:10, 29 December 2007 (UTC)
It was me who re-added the removed part. I added a reference to a Microsoft website because I misunderstood the last removal comment. However, the fact that .NET and C# are too strongly tied to MS Windows is really a critic I hear sometimes, and I can't say I don't agree with it. But I also agree with the need of sourcing, so now I linked a critic by Bjarne Stroustrup, which I think is appropriate here. One last thing: I don't know why everybody is so touchy about sourcing everything here, a lot of critics on other languages are not sourced too; I agree they also need to be sourced, but I don't thing people would accept if these critics were removed just because of that (see Criticism of the C programming language for example) Hervegirod (talk) 19:01, 29 December 2007 (UTC)
Reliable sourcing is necessary because otherwise we don't know if people are making things up. It's better to say nothing at all than to have bad information in the article. Wikipedia:Verifiability explains this. -/- Warren 14:45, 30 December 2007 (UTC)

edits to Implementations

I cleaned up some incorrect statements about MS products. 1) I don't think that the C# compiler is included with the .NET framework. It comes with the SDK. 2) "Microsoft Visual C#" is the name of the compiler, but "Microsoft Visual C# Express Edition" is the name of a development environment that includes Visual Studio and the compiler. (That's marketing for you!) Leotohill (talk) 03:55, 3 January 2008 (UTC)

I think the compilers (the CLI compiler csc.exe) do come with the framework. csc.exe is in the \Windows\Microsoft.NET\Framework\v<version number>\ folder. And Visual C# is not just the compiler but associated language services that help integrate it with the VStudio IDE. The compiler comes with .net fx but the language services with vstudio. Go figure. --soum talk 04:57, 3 January 2008 (UTC)
Looks like you are correct about the compiler being in the fw. That's a little suprising. But the name of the compiler is "Microsoft (R) Visual C# 2005 Compiler" . That's what comes up when you run it at the command line, which I don't think involves visual studio at all. Leotohill (talk) 05:17, 3 January 2008 (UTC)
The compiler (the vc# compiler) is independent of visual studio but the components that integrate c# support into the ide is a part of vstudio. Those components are also called vc# (the vc# language services). But I don't think we need to make the waters that muddy, at least not here. --soum talk 05:46, 3 January 2008 (UTC)
I know this is an awfully old thread to reply upon, but please note that if compilation was not somehow built into (around? next to?) the framework, IIS could not build and run asp.net pages. Root4(one) 01:59, 3 September 2008 (UTC)

Disambiguation for C sharp

Is there any reason this article can't be moved to C sharp (programming language) or something like that? Given all the musical articles ([C♯ (music), C-sharp major, C-sharp minor), the term "C sharp" desperately needs a disambiguation page. Torc2 (talk) 00:17, 7 January 2008 (UTC)

This was done on 9 Jan. by Torc2 without further discusion. OK, fair enough, but I think we now have a minor problem with the line that says:
The correct title of this article is C#. The substitution or omission of a # sign is because of technical restrictions.
It should say,
The correct name of the programming language is C#. The substitution or omission of a # sign is because of technical restrictions.
Or am I being too picky? (Nerd behavior?)
I was thinking of changing that line myself, but it's generated by a template, and that template is apparently fairly deeply integrated into Wikipedia's presentation processing. I'm thinking that correct procedure would be to request creation of a new, more general template to take care of our problem. But is it worth the effort? --RenniePet (talk) 06:28, 27 January 2008 (UTC)
Make it "The correct title of this article is C# (programming language). ... " Or just move this back to C Sharp... -- JHunterJ (talk) 11:52, 6 February 2008 (UTC)
User:Elliskev fixed this 28 January 2008 - thanks. --RenniePet (talk) 18:09, 8 February 2008 (UTC)

history section needs expanding

Some helpful links here.

I'll see if I can help a bit. MahangaTalk 04:26, 27 January 2008 (UTC)

C# error code standardization ???

It could sounds difficult, does it? If Microsoft developed this language and MS have had culture of MS error coding, would Microsoft please kindly provide the C# error database??? —Preceding unsigned comment added by 64.62.138.95 (talk) 10:17, 23 February 2008 (UTC)

Currently, MS have a complier error db ranging from 0001 to 9999. What about application errors based on C#, although it is industrial specific. Could error db be generated on the application of OS written by C# ???

Standard validation issue...

Fortunately, Northernhenge has also modified the standardization section to C# specification only. Otherwise, people will questioning the validation report of the ISO standard —Preceding unsigned comment added by 64.62.138.94 (talk) 05:12, 24 February 2008 (UTC)

Appending to the validation of the standard issue...

Since ISO people are now playing game with me, I will request for the citation of the validation report on ISO/IEC 23270:2006 - Information technology -- Programming languages -- C#

http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=42926

Since the standard is not free of charge, I downloaded TOC from

http://webstore.iec.ch/preview/info_isoiec23270%7Bed2.0%7Den.pdf

whether it is accurate or not, it's another matter.

In section 8.7.3 Methods which is under 8.7 Classes —Preceding unsigned comment added by 64.62.138.95 (talk) 07:14, 24 February 2008 (UTC)

Shouldn't it be validated? Wherever there is a method, it should be validated no matter what. Usually, people is unable to validate rules which can usually be request for justification, but this is not applicable to methods which is not justified but can always be revised and validated in some ways

I suggest that ISO people need to distinguish the rule- or method- based standards clearly (different coding) so that people will be reviewing the standards for either justification or validation —Preceding unsigned comment added by 64.62.138.95 (talk) 08:47, 24 February 2008 (UTC)

With regard to method based standards, the nature shows that objectivity is more than subjectivity —Preceding unsigned comment added by 65.49.2.96 (talk) 03:55, 25 February 2008 (UTC) It is more transparent (95%, I would say) -- which means the power balance among the entities are 95% of scientific and democratic power, while only 5% of administrative power

With regarding to rule based standards, there are always power broking out there and the nature shows that subjectivity is more superior than objectivity. Another part of nature is that there is always some sort degree of confidentiality associated with, regardless whether it is the process of bill passing or veto in parliament or congress, software releasing, and univerisity degree offering. The drawback of voting system is that vote without necessarily providing reason. Among the three systems, the best practice, I personally consider, is the degree offering with which at least five examingers have to provide independent reports with the reason provided for examinees to seek higer degrees

Unsafe typing?

In the language profile left of the menu it says that the typing discipline is both safe and unsafe. The article itself does not mention unsafe typing. Can someone make this clear. Stilgar (talk) 06:57, 20 June 2008 (UTC)

you can always explicitly downcast some variable of type object (referencing some class instance or boxed type object) to something of, say type Donkey if you had defined such a type. Doesn't mean it would succeed though ;-). Root4(one) 01:52, 3 September 2008 (UTC)

"Enumeration members are placed in their own namespace" ?

I don't understand what this means. Are we saying that any enum you create must have a dedicated namespace containing only other enums? That's how i'm interpreting this sentence, but i know that isn't true. I can declare an enum in any namespace i want. In the section this statement is made, it's comparing features between C# and C++. C++ enums are essentially "global" identifiers, but C# has no concept of a global. Is this the intended meaning behind the original statement? I think some clarification is in order. 0xDEADC0DE (talk) 16:29, 22 June 2008 (UTC)

Unlike C++ enumerators, which are always placed in the surrounding namespace, C# enum members have to be qualified with the enum name:
Enum members are named and scoped in a manner exactly analogous to fields within classes. The scope of an enum member is the body of its containing enum type. Within that scope, enum members can be referred to by their simple name. From all other code, the name of an enum member must be qualified with the name of its enum type. Enum members do not have any declared accessibility—an enum member is accessible if its containing enum type is accessible.
("C# Language Specification, Version 3.0", Section 14.3 "Enum members") — Tobias Bergemann (talk) 07:28, 26 June 2008 (UTC)

footnote 1 is ...

Footnote lists things in C# that supposedly influenced java: e.g. foreach, variadic, enumeration... why C# and not some other language? Hey anybody remember the sixties, back when they were already using this stuff? C# and java both got these from a couple of decades of history in computer science. Oi vey. —Preceding unsigned comment added by Blablablob (talkcontribs) 04:05, 4 August 2008 (UTC)


version =\=dialect

I changed ”dialect” on the infobox to ”version”Bettering the Wiki 23:42, 9 August 2008 (UTC)

anonymous delegates

There should be an example that illustrates the difference from real closure-functionality. —Preceding unsigned comment added by 129.35.204.162 (talk) 14:50, 2 September 2008 (UTC)

I was just thinking the same thing. Anonymous delegates perform variable capture... making them sound awfully like closures to me. Anonymous Methods C# do mention some types of variables that cannot be captured but do explicitly name "outer" or "captured" variables. That's not enough for me to revert your edit, though. Root4(one) 01:45, 3 September 2008 (UTC)
Closures are expected to work with the variable state when they are assigned, not the variable state when they are called. —Preceding unsigned comment added by 129.35.204.162 (talk) 07:40, 3 September 2008 (UTC)

...Scratches head.... If that's true, then not even scheme has closures!

(let 
   ((result 
      (let 
         ((x 1))
         (cons (lambda() (display x) (display " ";)) 
               (lambda()(set! x (+ 1 x))))))) 
   ((car result)) 
   ((cdr result)) 
   ((car result)))

The above scheme captures x with two closures, returns them in a cons pairing to get out of x's scope, and executes each through accessing them (car,cdr) in the cons pair. The second closure uses "set!" to change the value of the captured variable that both closures point to. It produces output "1 2 ". Root4(one) 09:38, 3 September 2008 (UTC)

Ok maybe I didn't quite get the meaning of closures right. It's quite an unexpected behavior imo but maybe that doesn't qualify to call anonymous delegates not closures. On the other hand I've read a blog comment that even developers of the C#-language say that anonymous delegates are no closures whatsoever. —Preceding unsigned comment added by 129.35.204.162 (talk) 11:51, 3 September 2008 (UTC)

c++ upcoming new standard will support type constraints in templates

"They support some features not supported directly by C++ templates such as type constraints on generic parameters by use of interfaces."

Maybe it is good to mention that the upcoming c++ standard will support type constraints, since there is a rather extensive comparison between c# and c++ in this article. Or, maybe, we should wait until the new standard is get published. 87.202.31.27 (talk) 12:39, 17 September 2008 (UTC)

Examples

I've been looking at this article and it seems to be made up of a lot of textbook and how-to material. Is there any reason it shouldn't just be transwikied to Wikiversity? Not the whole article, but all of the coding examples. §hep¡Talk to me! 08:20, 28 November 2008 (UTC)

Support. I do also feel as if it is more of a textbook, rather than a Wiki article itself. I think the same also applies to C Sharp Syntax. Also during the process, I also support for a Merge of C Sharp Syntax with this article. However, I do feel that at the same time, we should keep a general reference to the syntax available on Wikipedia. Aly89 (talk) 23:34, 28 November 2008 (UTC)
There's no reason we couldn't include the sisterlinks box to Wikibooks. §hep¡Talk to me! 00:16, 29 November 2008 (UTC)

History section

New discussions go at the bottom of the page. To avoid this error again you can use the tab at the top of the page that says "new section" §hep¡Talk to me! 20:44, 17 December 2008 (UTC)

I apologize if this has already been addressed, but i'd like to voice my concern over the relevency/accuracy of the first paragraph of this section. The paragraph is talking about Sun's release of Java's and Microsoft's subsequent licensing of Java. My concerns are:

(1) it seems off-topic since this article is obviously about C# and not Java. (2) While the lawsuit between Sun and Microsoft over Java is certainly factual and verifiable, the mention of it here seems out of place since the author seems to be speculating that the outcome of the lawsuit in Sun's favor was the impetus for creating C#. NO sources are cited for this (unlike the rest of the "History" section which is well-cited). At the risk of not assuming good faith, this sounds like a subtle rehash of the "C# is just a copy of Java" tirade. (3) The author seems to imply that C# is "partially compiled [and] partially interpreted". That is false. Managed code is never interpreted according to this: [5]

For these reasons, I feel this paragraph under the "History" should be removed. Thanks. 0xDEADC0DE (talk) 19:16, 17 December 2008 (UTC)

I say keep it. I agree that some citations would be nice, but it's not very far-fetched. It's indisputable that Microsoft wanted to extend Java with delegates (bound method references), but had trouble getting acceptance from Sun for this (see this article from late 1998). The C# team was formed in 1999. And of course, post hoc implies propter hoc ;) Alf (talk) 22:57, 17 December 2008 (UTC)

Reserved Words

New discussions go at the bottom of the page. To avoid this error again you can use the tab at the top of the page that says "new section" §hep¡Talk to me! 20:44, 17 December 2008 (UTC)

"C# currently (as of 3 June 2008) has 77 reserved words." - I don't think that this is correct. How do we define "reserved word" here? I personally think of context-based "key"-words as reserved too. Other opinions? 81.10.150.42 (talk)

I think there is actually no reserved words in C# because a variable can be a keyword as long as it is preceded by the character @. 1:30, 15 January 2009 (UTC)
I think that there are those 77 reserved words, because those words have to be escaped with the @. Aroni125 (talk) 22:08, 17 March 2009 (UTC)

oops.

I'm so sorry, I hadn't realized using a # is the official name. Can someone revert the move? - MK (talk/contribs) 06:54, 28 January 2009 (UTC)

OK done. --Salix (talk): 09:48, 28 January 2009 (UTC)

"run more slowly and require more memory than functionally similar applications written in native languages like C++"

Benchmarks are outdated (based on unoptimized versions of mono) and use completely different code.

e.g. the sourcecode for binary-tree (http://shootout.alioth.debian.org/) used in C++ is far more optimized than the code for the C# benchmark.

Besides, generic benchmarks is where C++ has an advantage it does not have in the real world: optimization, customization and no platform or portability constraints. (C++/compiler has to be optimized for each OS/CPU, C# does that automatically without recompilation)

--zeroflag (talk) 10:00, 29 January 2009 (UTC)

I agree. This statement is way too generalized (especially w/r/t execution speed - C# will likely take more memory, though) and needs more support than like two generic benchmarks. Contrast http://blogs.msdn.com/ricom/archive/2005/05/19/420158.aspx where we have the C# version of code being ~10 times faster than the equivalent C++ version. Tim Song (talk) 19:57, 30 January 2009 (UTC)

It's probably more accurate to say that a program running on the CLR has greater fixed (baseline) costs than a native program, since the runtime is large and complex. However, there's no reason that C# could not be compiled to native code (as the experimental Bartok compiler does) that has comparable fixed costs to C++; and conversely, a trivial Managed C++ application would also suffer from high fixed cost. This article is conflating environment with language. That said, fully general GC is a language feature does inevitably require some fixed runtime overhead that C++ programs don't have to deal with. Dcoetzee 03:23, 31 January 2009 (UTC)

Do we really need all these code examples

Do we really need all of the code examples listed here? It seems like that is not what the purpose of the article should be. This should be an informative place to learn about the abilities of the language. I think that all of the examples become quite clunky, and cumbersome. I can get all of that information from any of 100 different sites, and it is not adding anything to the article. I would rather see a brief description about each of its features, rather than an example.(192.43.65.245 (talk)) —Preceding undated comment added 14:37, 8 April 2009 (UTC).

"Some argue"

User:无名氏 has been breaking the three-revert rule here recently over a very minor issue. S/he seems not to have read the document that he finally cited to back him up. The weasel-word style guideline summarises itself as 'Avoid using phrases such as "some people say" without providing sources' and begins 'Weasel words are words or phrases that seemingly support statements without attributing opinions to verifiable sources'. This user has spent the last 24 hours repeatedly trying to add a {{who}} tag to a simple sentence that has had a source cited right at the end of it for weeks. Please try to help this user with their edits until they gain a little more experience with our policies and endeavours here. --Nigelj (talk) 16:41, 26 April 2009 (UTC)

thank you for removing the phrase. however, I have just looked at the reference, and there is a serious verifiability issue relating to the nature of the source. the reference is to a web site containing original research published by an individual. self publication, particularly an individual's web site or blog, does not qualify as a reliable source on wikipedia. also, the page appears only to document which languages had which features first, which doesn't provide any specific evidence of influence. if it were a reliable source, it would only support the claim that certain languages had certain features before C#. -无氏- 18:21, 26 April 2009 (UTC)
I am, therefore, removing the reference and marking the claim that it supported with a fact tag. I propose that based on the wikipedia policy "Do not leave unsourced or poorly sourced information that may damage the reputation of living persons or organizations in articles and do not move it to the talk page" the claim should be removed in a timely manner if no reference can be provided, as claims about C# having been derived from languages that are competing for market space, or that have conflicting programming models (such as duck typing) could be considered damaging. -无氏- 18:21, 26 April 2009 (UTC)
also, regarding your 3RR claim, I added a tag, and you repeatedly reverted my edit. a 3RR violation would therefore be on your part. please discontinue using uncivil and personal language such as your 3RR accusation and "Please stop adding nonsense to the article." "Try to bring a sensible end to 无名氏's pedantry." "Please try to help this user with their edits until they gain a little more experience with our policies and endeavours here." -无氏- 18:21, 26 April 2009 (UTC)
For goodness sake, please try to be constructive. If you are not happy with a cited source - find a better one, don't just remove a perfectly reasonable, hard won citation and insert a 'fact' tag. If you want to challenge a statement in an article, please read the article first - you will find that the point made in that sentence is repeated several times in different parts of the text with different sources as appropriate. If you want to cite WP policy, please read the policy document first. Etc etc. You began using the current username at 20:38, 18 April 2009,[6] which is less than a week ago, and you have already been accused of trolling when you upset a whole series of other editors in this discussion. I don't intend to 'feed' you with any more argument. --Nigelj (talk) 19:23, 26 April 2009 (UTC)
I have no obligation to search for alternate references. the reference that I removed is a self published web site with original research by an individual. in other words, it is not a valid reference on wikipedia, it isn't even close. it should not be cited as a reference anywhere in wikipedia, for any statement. your opinions about me or my edit history have no bearing on that matter. -无氏- 19:35, 26 April 2009 (UTC)
deleting content like you did is disruptive and do not help this project in any way. In 10 minutes, you could have found better sources, and you would have avoided a lengthy discussion with other editors that must have taken more than 10 minutes of your time. Hervegirod (talk) 20:18, 26 April 2009 (UTC)
again, a self published personal web site is not a valid reference on wikipedia, and I am going to continue deleting it per Wikipedia:Verifiability, specifically Wikipedia:SOURCES, and also, Wikipedia:Reliable_sources. please consult those documents.
that also includes http://www.artima.com/weblogs/viewpost.jsp?thread=6543: "After Java and C# - what is next?" note that the site refers to itself as a blog and its authors as bloggers. I intend to remove every instance of that reference for verifiability reasons.
the other two references are somewhat less dubious, but they do appear to be non-peer-reviewed online-only publications that are essentially just blogs under the banner of an online magazine, and I believe they warrant further scrutiny. I don't have the time to build a solid case for deleting them right now, though, so I don't intend to delete them at this point, but can you point to any reference in print that supports the claim? -无氏- 20:50, 26 April 2009 (UTC)
Dr. Dobb's Journal is a well-known monthly about computers. I don't have the time to build a solid case for deleting them right now => What's your problem about this reference? Hervegirod (talk) 20:56, 26 April 2009 (UTC)
it fails to meet any of wikipedia's standards for references (print, peer review, notable publisher, academic notability, etc..) -无氏- 21:03, 26 April 2009 (UTC)
The pages you're insisting on removing are documents written by established experts in their respective fields. WP:SPS, which is part of WP:V, explicitly allows for this. Erik Levenez, especially, is recognized as being an authority on the history of and relations between operating systems. Warren -talk- 22:36, 26 April 2009 (UTC)
Self-published material may, in some circumstances, be acceptable when produced by an established expert on the topic of the article whose work in the relevant field has previously been published by reliable third-party publications. However, caution should be exercised when using such sources: if the information in question is really worth reporting, someone else is likely to have done so.
that would seem to apply to kreft and langer as they have published a book on C++ streams, and I'm not going to argue the distinction between C++ streams and comparing C# to java as grounds for exclusion. however, levenez does not appear to be published or well recognized. can you provide a reference for your assertion about him? also, if the claim about C# and java is valid, why isn't it in print? -无氏- 23:23, 26 April 2009 (UTC)
In the area of operating system history timelines (admittedly a limited field), his charts are well-known. You don't have to be a published print author to be recognized as an expert in your field. But, if you're demanding an example of a reliable third party publishing Levenez's work, look here -- O'Reilly & Associates both publishes and recommends the use of his charts. Warren -talk- 19:04, 27 April 2009 (UTC)

(Outdent) I must say I agree with 无名氏 that the artima.com is a very week source for the fact C# is derived from Java. What would be ideal is something closer to the designers, maybe someone who actually worked on the project, stating some of the design goals of the language. Failing that the the Dr Dobbs article is better, it at least goes to some detail of the comparison.

The revert war is not good though. Discussion should be kept here. I'm quite happy to use my admin bit if it continues. --Salix (talk): 19:59, 27 April 2009 (UTC)

in my own limited search, I haven't found any offline (print) source that supports the claim, and nothing online that is academic and/or peer reviewed. though, I don't deny that many similarities exist. in fact, as someone who has used Java and C# extensively, I find the similarities overwhelming. however, similarity and derivation are legally and technically separate, and I think the distinction is important, because the references only document similarities, providing no direct evidence of derivation. I mainly just don't like the nature of the references, though. especially a blog that openly calls itself a blog. I mean, whether it is by published authors or not, the article isn't presented as being a well researched, well reviewed formal paper.
my personal opinion is that there is clear evidence to support a claim that C# and Java have many similarities, but I would soften the wording suggesting that C# is explicitly derived from Java. maybe clearly stating that there are similarities, but naming and quoting people who speculate that C# may be derived from Java, rather than stating it as a proven fact, if the claim must be included. -无氏- 22:57, 27 April 2009 (UTC)
While the artima.com article is valid as a source according to WP:V (both authors are published by Addison-Wesley), I don't believe it supports the claim that C# is "heavily influenced by Java." At most, it claims that they are "siblings." Logically, only the language creators could even speak about this. Unless the designers are quoted, anything else is technically just conjecture. I've looked for anything from Hejlsberg, Wiltamuth, Golde, Sollich, and Gunnerson on the subject, but my search came up empty.
The arguments here for the inclusion of the claim are certainly in good faith, but reasons for inclusion like "Levenez's languages chart is famous in computing circles" is not really relevant. (Nuggetboy) (talk) (contribs) 13:39, 28 April 2009 (UTC)
In re: Levenez, I did not see this until just now. (Nuggetboy) (talk) (contribs) 13:47, 28 April 2009 (UTC)
how many blog posts and famous wall posters does britannica cite for statements of fact? if wikipedia isn't going to follow encyclopedic standards of using only formal peer reviewed books and papers as references for facts, then wikipedia isn't going to be encyclopedic. if the C++ streams book by the blog authors were the reference, I wouldn't object, but it's a weak standard to suggest that if someone has a book published, then any informal comment they make in an online forum about anything even remotely related becomes a good reference. publishing libelous inaccuracies through a reputable publisher is difficult because publishers do fact checking and reviewing in order to protect themselves, and that's why there is a huge distinction between self published works and formally published works. if an encyclopedia gets a fact wrong then there should be some formal source to blame, not just some speculation posted one day on a blog by someone who once authored a book. in other words, an encyclopedia shouldn't contain claims of fact where it can't point to an expert who formally supported a claim, and who could be blamed for an accuracy issue. "a guy who wrote a book guessed so on his blog" wouldn't hold up in court if wikipedia were sued for libel or other damages.
also, in this case, microsoft seems to have specifically avoided making any public suggestion that C# is derived from Java, and they do have a vested interest in that perception, so it would be nice to have at least one reference that would meet the standards of a conventional encyclopedia. -无氏- 14:33, 28 April 2009 (UTC)
if wikipedia isn't going to follow encyclopedic standards of using only formal peer reviewed books and papers as references for facts ; it is ABSOLUTELY NOT a rule of wikipedia to use only formal peer reviewed sources. Hervegirod (talk) 02:01, 29 April 2009 (UTC)
for the accusation that microsoft copied sun's designs, it may be reasonable to seek a more solid reference than would be required for a claim about, for example, woodworking practices. if nothing else, an explicit claim by someone would be nice, rather than a number of informal links that just point out similarities and make speculations. -无氏- 05:54, 29 April 2009 (UTC)

Don't forget, 无名氏, that the sentence in question here originally began with the words "Some argue that...", but you strenuously (and I believe wrongly since there was always a citation as to who exactly was arguing this) argued that these were "weasel words" until they were removed. So we now have a direct claim that, "C# has roots in other languages including Java, JavaScript and Delphi", rather than the original softer statement. Two questions: Was that all part of a reductio ad absurdum rhetorical tactic on you part? Is all this really worth the effort, per sentence? (There's 16KB of discussion here already and you haven't started discussing C#'s relationships with JavaScript and Delphi yet) --Nigelj (talk) 20:00, 29 April 2009 (UTC)

my objection has been consistent: that there aren't sufficient grounds for wikipedia to take a stand in stating as a fact or consensus that microsoft derived C# from java, and that this is a fairly sensitive matter that warrants discretion and erring on the side of caution.
the remedy that I have proposed has also been consistent: that, rather than stating "Some argue x is a fact" or worse, "x is a fact," wikipedia should err on the side of caution and explicitly name and quote individuals who speculate that C# may be derived from java, if such a statement must be included at all. -无氏- 20:54, 29 April 2009 (UTC)

I think this quote is illuminating

Osborn: I've been looking at press stories about C# [pronounced "See sharp"] and notice that many of them seem to lead with the observation -- or perhaps the theory -- that C# is either a clone of or a Microsoft replacement for Java. If you could write the headlines, what would you like people to say about the language?

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.

From Deep Inside C#: An Interview with Microsoft Chief Architect Anders Hejlsberg 08/01/2000.--Salix (talk): 21:31, 29 April 2009 (UTC)

that's a great quote. my interpretation is that Hejlsberg denies that C# is specifically rooted in java, or that the ideas behind C# are specific or unique to java. -无氏- 21:55, 29 April 2009 (UTC)
Another Wikipedia rule is "Wikipedia articles should rely mainly on published reliable secondary sources and, to a lesser extent, on tertiary sources. All interpretive claims, analyses, or synthetic claims about primary sources must be referenced to a secondary source, rather than original analysis of the primary-source material by Wikipedia editors." Hejlsberg is obviously a primary source (I'm not saying that his quote is not interesting) (Wikipedia:PRIMARY) Hervegirod (talk) 22:58, 29 April 2009 (UTC)
a quote from an o'reilly media interview is not a primary source. Hejlsberg isn't signing onto wikipedia to clarify this as an editor, he's being quoted in a secondary source. this is exactly what an administrator asked for above: What would be ideal is something closer to the designers, maybe someone who actually worked on the project, stating some of the design goals of the language.
I'm saying that I think it's clear that Hejlsberg denies the sort of speculation based on comparison that's being cited in the existing would-be references, and that the supported claims should be removed.
also, the existing references don't really even support the statements in the article.
for instance, artima.com says C# borrowed a lot from Java - and vice versa. Now that C# supports boxing and unboxing, we'll have a very similar feature in Java. Have we desperately been waiting for autoboxing in Java? Certainly not. Perhaps, we've been eagerly awaiting Java generics, which - surprise, surprise - look pretty much like generics in C#. which, if anything, suggests an evolutionary exchange in which C# is actually the dominant side. also, this is essentially just a comparison, on a blog. it's not stating anything about the development process.
the extremetech.com article says Sure, there's some evidence for parallel evolution here. Both languages do share a common ancestry in C++. But are they siblings of a common parent, or is Java really the secret parent--or at least a silent partner--when it comes to C#? which seems to conflict with the idea that they're making a definitive statement. and this, too, is speculation based on comparative analysis of the two languages, not documentation of the design process of C#.
the dr.dobbs article and the wall poster don't even take anything resembling a stance on derivation. they don't make claims like the ones that they supposedly support. -无氏- 23:45, 29 April 2009 (UTC)
Primary sources are sources very close to an event: being the lead of C# development team, Hejlsberg could not be closer. And about the extremetech.com article, the sentence you quote is ironic I think, as the author also says: enough to show that the C# team has borrowed some of the names of classes and APIs directly from Java, Yet, there is enough in common to at least suggest that C# was developed with an eye toward Java, When it comes to graphics, the designers at Microsoft have done their homework and clearly taken a look at the way it's done in Java, (it) shows that Microsoft's latest language makes use of many of the features of Java while adding some nifty new enhancements. Microsoft has all but made the Java to C# link explicit with an announcement of its Jump initiative. As for the Dr. Dobbs article: Microsoft decided to take its advances in the Java language, Java compiler, and JVM and morph them into an even more ambitious project — Microsoft .NET. according to Anders Hejlsberg in a recent interview, "C# is not a Java clone". Right, it's a MemberwiseClone. Hervegirod (talk) 00:21, 30 April 2009 (UTC)
enough to show that the C# team has borrowed some of the names of classes and APIs directly from Java the C# language doesn't have built-in classes. you and that apparently unqualified speculator are thinking of the CLI and/or .NET.
Yet, there is enough in common to at least suggest that C# was developed with an eye toward Java does that support the claims in the article?
When it comes to graphics, the designers at Microsoft have done their homework and clearly taken a look at the way it's done in Java C# and the CLI have no graphical features. presumably that person is talking about .NET, which isn't the subject of this article.
(it) shows that Microsoft's latest language makes use of many of the features of Java while adding some nifty new enhancements. Microsoft has all but made the Java to C# link explicit with an announcement of its Jump initiative JUMP has absolutely nothing to do with C#, it's about J#, a separate language that is specifically designed to emulate Java. that article is not only a non-print, online-only, unqualified source, it's straight wrong, referring to J# and .NET as "C#" and making claims under the wrong name that are not only inaccurate but totally unrelated to the C# language. this is why these garbage sources are problematic: there is no reviewing or fact checking, the authors are often unqualified enthusiasts, and they're often very wrong. why don't I go publish an article with my own opinions in an online magazine so we can just go by that and put this to bed?
Microsoft decided to take its advances in the Java language, Java compiler, and JVM and morph them into an even more ambitious project — Microsoft .NET again, C# is not .NET.
according to Anders Hejlsberg in a recent interview, "C# is not a Java clone". Right, it's a MemberwiseClone. the paragraph is about the Object class and its members like MemberwiseClone, which are a part of the CLI, not the C# language.
so basically, your argument is that a direct quote on this subject from the lead developer of C# is not a reliable source, but non-print, non-reviewed online blogs, journals, and posters that present no facts about the development of C# and that simply speculate based on language features are good references that warrant a statement of fact that C# is derived from java? -无氏- 01:02, 30 April 2009 (UTC)
Wikipedia policy is not to rely only on primary sources, the question is not that it is reliable or not. It's basically how this project is working. And here you are interpreting what is in the article. Second non-print sources or journals are not no-reliable by themselves. If you think it's the case (again it's not Wikipedia policy) then 80% or wikipedia sources must be deleted. It's not a Wikipedia policy to remove a source if it is only available online. Third here we are not saying that C# is only deriving from Java, but that C# has borrowed a lot from Java, among other languages (that are also listed). Hervegirod (talk) 09:45, 30 April 2009 (UTC)
at least one of us is confused about what a primary source means in wikipedia. my understanding of the concept is that wikipedia's editors shouldn't directly interact with or observe experts or events in order to post original quotes here or to contribute original claims to articles, because wikipedia isn't intended to be a reliable journalistic source that can be trusted if it has no secondary source to point to. however, there are valid secondary sources that are considered trusted in interacting with primary sources, and we can cite them, and their factual observations and quotations of people. for instance, if the new york times publishes a report that says "the protesters easily numbered in the tens of thousands," then that is something we can cite, but wikipedia can't take the place of the new york times and produce its own article from primary sources, citing its editors as reliable sources. wikipedia can't be a secondary source that directly quotes primary sources, but it can be a tertiary source that cites secondary sources that quote primary sources.
so an o'reilly media interview with Hejlsberg is a great source, but a wikipedian conducting an interview with Hejlsberg and quoting him wouldn't be a good source because we'd have to cite that wikipedian. or for example, Hejlsberg editing wikipedia himself wouldn't give us the reference that we need, it would make us the reliable source by our own estimation, which we aren't supposed to be. in other words, you can't list an individual who supposedly contributed something to wikipedia as your reference, and that's the primary source issue. that is, "Something about physics" (we claim that Stephen Hawking said this to us) is not ok, but "Something about physics" (citing a credible journal quoting Stephen Hawking) is fine.
note: primary vs secondary has nothing to do with whether Hejlsberg is a reliable source on the subject, it's about how we get the information. the fact that he is qualified shouldn't be in question, he is.
anyway, not only are 3/4 of your references of very poor reliability, and not only are most of your quotes from them factually wrong or at best incorrectly referring to the .NET class library as C#, they also do not directly support your claims. they only provide what could be interpreted as evidence which isn't useful here.
again, I could just as easily publish my thoughts in an online magazine to make a new reference that is as credible as the two online articles you're citing, so that goes to tell you something about how poor those references are.
also, that would seem to be less than a coincidence that the only reference with any real credibility (artima.com) is not referring to the .NET class library as "C#", and would, if anything, more strongly suggest that java is derived from C#. in fact, if the claim stays in the article and the artima.com reference remains then the article about java should have a similar claim added about C#, because the artima.com reference says "and vica-versa" and only talks about C# features that ended up in java on the subject of derivation. -无氏- 15:22, 30 April 2009 (UTC)

Secn break(C# inspirations)

Without getting drawn into the debate (which I admit I don't have the full facts of), I want to provide some general comments. The policies are not meant to be followed to the word, but to the spirit. The wording provides the use cases of the most common scenarios, but if there are cases where for which there is no mention in the policy/guideline, make sure what you do follows the spirit of the policy.

Using your analogy, if I go and report on a, say, conference, it won't be allowed. Because its my words. But if I interview Anders, I can very well use that because that's his words, not mine. And his words are an authoritative source for anything C#, no doubt about it. [There is another thing to be careful here, and thats verifiability. If I publish the intreview transcript, then there is no easy way to verify its authenticity. But if I publish a video recording, then it most likely is authentic; doctoring an entire interview would be extremely impractical]. Same goes for using private communication with authoritative sources as references. We would prefer if there were secondary sources had done it instead of us, but in its absense, we can do it provided it is independently verifiable. [I know their are various nitty-gritties that can be debated, but all I provided was a mile-high view, there are more issues to it that rear their head on a case-by-case basis].

And if something someone (authoritative or reliable, irrespective) says is opinion and not fact, then it cannot be presented as fact but presented as opinion of that person. We also do not take the responsibility of deciding whether its correct or not. If that opinion has got weight, it is suitable for inclusion. If there are other opinions on the same topic, they too should be included. The task of deciding which to believe should be left to the user. We are not supposed to take sides. And definitely not use quotes from anywhere for anything but quoting them (absolutely not as evidence for some conclusion).

For example, if James Gosling says C# was inspired by Java, it can belong here. If Bjarne Stroustrup says its derived from C++, it too belongs here. We do not provide any analysis of our own to prove someone wrong or someone right. But if Dave Cutler provides an analysis opining Gosling is wrong, it can be put here.

So our task boils down to finding as many sides regarding the issue as we can, deciding whether or not that opinion is loud enough and whether the person opining is well-known enough. And if all that is independently verifiable or not. If so, it can get into the article. Regardless of whether their analysis can stand the scrutiny of us editors. [If someone equally well known provides refutes, that too can be put in, but not at the expense of the former].

Also, these issues are resolved on a article-by-article basis; consensus across editors of the article is enough. And not look at what is happening in other articles (because anyone may do anything to those articles). To make it somewhat binding across article, a consensus across editors of a large number of articles is required. Which is possible only via a centralized policy discussion. --soumtalk 16:04, 30 April 2009 (UTC)

the case for the existing claims seems to be one of gathering evidence for a conclusion, rather than quoting direct support. other than perhaps quality concerns, I would have no objection to simply listing a number of quotes, but there are no quotes in the references that directly support the existing claims, so that approach would seem to imply removal of the conclusion that C# is derived from java, leaving only random citations about language similarities with no specific statement about derivation, plus the quote of Hejlsberg's denial of the conclusion. -无氏- 17:08, 30 April 2009 (UTC)
I have no problem on quoting Hejlsberg, I have a problem relying only on what Hejlsberg says about where C# comes from. BTW, Hejlsberg was an architect on Visual J++ and Windows Foundation Classes, and he was the lead architect on Delphi. However, I'm not a source ;) But I would have no problem, for example, with a sentence saying that C# was considered by many reviewers to be heavily influenced by Java, but that this influence is denied by Hejlsberg. As you see, you don't need to put only random citations to comply with Wikipedia policy. Hervegirod (talk) 21:07, 30 April 2009 (UTC)
I don't think there should be any generalizing, paraphrasing, claiming that the overall spin of an article supports a claim in your own words, or other drawing of conclusions in this case.
this is a matter of controversy, with the lead designer of C# having expressed disagreement with the claims, so you're not going to prove anything resembling consensus for any conclusions. what you can prove are explicit statements by reliable sources, and if they do explicitly support your claims then you should be able to simply quote one or more of them to make your point. though, if they don't provide explicit support, then you're using them as indirect evidence to support a conclusion that an expert has explicitly addressed and rejected in an interview with a reliable secondary source, and the obvious default would be to exclude your conclusion. -无氏- 21:52, 30 April 2009 (UTC)
Who other than Hejlsberg and others on the Cool project can provide as-good-as-authoritative information on the origins of C#? Anybody who wasn't inolved in meetings can only offer their opinions, which could either be spot on, or wildly inaccurate. It's probably fine to quote sufficiently interesting expert sources on the topic, but the wording would have to make it clear that what they are saying is entirely a matter of their opinion, not a matter of fact. If you look at, say, Criticsm of Windows Vista, the sources of most of the opinions and views expressed in that article are called out right in the article text. That's the approach we should take here. Warren -talk- 00:06, 1 May 2009 (UTC)

consensus would seem to be that if speculation about C# being derived from java is to be included then the article should quote one or more specific sources, rather than stating an editor's original words as a fact or as paraphrasing of what "some argue." therefore, I would like to remove the existing statements, which someone could then replace with one or more direct quotes. though, this type of speculation has been addressed and denied by the lead language designer, and not only do the references take a softer and less explicit stand than the current conclusions in the article, but they're also third parties who had nothing to do with the development of C#, so it probably doesn't belong in the introduction at all. -无氏- 14:59, 2 May 2009 (UTC)

If you took some time to search by yourself, you would have been able to found numerous references about Java / C# inheritance (and I think its the same with Delphi). NO language is defined in a vacuum, and no GC VM could step completely away from Java when C# was designed, if only because Java was the first really popular GC language at the moment. Someone mentioned that if Gosling said the C# copied Java, we should put it here. Gosling said it: [7]. I don't say / think that Gosling is more reliable than Hejlsberg, but he is not less reliable, and they are both primary sources. Hervegirod (talk) 17:34, 2 May 2009 (UTC)
that seems reasonable, so what I propose is deleting the existing claims from the intro and history section and placing that Gosling quote, verbatim, and any others you can find, plus Hejlsberg's rebuke into the history section, or some other section, maybe a special section devoted to this controversy. -无氏- 18:30, 2 May 2009 (UTC)

I've deleted the conclusions about derivation that were presented as statements of fact in an editor's own words. my personal opinion is that this article should mainly be about what C# is, focusing on the definition and contemporary support and use of the language, not so much about history, especially unproven and controversial speculation by third parties about possible sources of inspiration, but in my opinion, adding some direct quotes of speculation by experts to the history section would be reasonable. -无氏- 00:26, 3 May 2009 (UTC)