Talk:C Sharp (programming language)/Archive 1

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Archive 1 Archive 2 Archive 3

Complete Hash

Certain cynics have suggested that C# should be pronounced complete hash. — Preceding unsigned comment added by 213.3.87.59 (talkcontribs) 02:26 30 Dec 2002 (UTC)

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? — Preceding unsigned comment added by 213.3.87.59 (talkcontribs) 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). — Preceding unsigned comment added by Vector4F (talkcontribs) 04:39, 6 July 2004 (UTC)
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". — Preceding unsigned comment added by 144.80.107.96 (talkcontribs) 03:56, 11 November 2004 (UTC)
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. — Preceding unsigned comment added by 139.168.158.70 (talkcontribs) 08:43, 28 January 2004 (UTC)

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)

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. — Preceding unsigned comment added by 144.80.107.96 (talkcontribs) 01:50, 15 November 2004 (UTC)

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)

Should Remove Marketing Entry

The "Marketing" entry in this article seems out of place, narrowly focused, and frankly it reads like an opinion more then a fact. I favor removing it, but wanted to solicit opinions before I did so. onebit 14 Jun 2004

Well, I think it's in place. It doesn't discuss the technical aspects of the language, but it's relevant. The section could probably have a better name, but other than that, I think it should stay. But I'm biased since I wrote it in the first place. —Frecklefoot 19:43, Jun 14, 2004 (UTC)
I wasn't trying to make a judgement on relevance. Instead, I was making a judgement on whether the statements in the section are fact or opinion. The statement that Mobile Software can be developed out of the box with C# and not so with C++ is a fact. The assertion that this has to do with marketing or that it is meant to move people off of the C++ language is not a documented fact; and so in this context it is an opinion. I am attempting to follow the guidelines found here here Wikipedia:Neutral point of view
If the section stated that the opinions are opinions, and if the section was re-titled as politics and marketing, then that might be a way of improving the entry such that it doesn't need removing altogether. Frecklefoot, are you open to my taking a stab at such as modification? --Onebit 20:23, Jun 14, 2004 (UTC)

Absolutely. :-) That's what's so great about being Wiki. But that point of view is not just mine, but of course that doesn't make it a fact either (I'm not anti-MS, but it is something that is rather glaring about VS.NET). —Frecklefoot 21:03, Jun 14, 2004 (UTC)

I agree that this is not quite NPOV. Also, how is being able to develop a C# mobile app from visual studio an example of MS's aggressive marketing of C#? When you're in there, try tacking that as well. --RanchoRosco 21:39, 14 Jun 2004 (UTC)

The marketing entry Onebit removed. Placing it here so it can rewritten or re-added at some point:

==Marketing==
Microsoft is aggressively marketing C# as well as the other .NET languages. For example, purchasers of the latest version of Visual Studio .NET (Microsoft's popular IDE) can immediately develop mobile device applications in C#. To develop mobile device applications in other languages, such as C++ (which Visual Studio supports), developers have to download a separate IDE which does not integrate with Visual Studio. With these barriers, Microsoft is motivating developers to abandon C++ and switch to C#.

To RanchoRosco: Users can develop a mobile application in C# from Visual Studio .NET "right out of the box." It even has wizards to build frameworks for your mobile application in C#. However, if you want to develop a mobile application in C++, you have to download a different IDE. This is incongruous since VS.NET is a C++ IDE (as well as a VB.NET, Managed C++ and C# IDE). Many developers complained about this confusing split (IIRC, previous versions of Visual Studio supported development of mobile applications in C++). The C++ mobile IDE is not as advanced as Visual Studio .NET and has fewer features. Many developers couldn't understand the removal except as a ploy to get developers to embrace C# instead of C++. Frecklefoot | Talk 14:51, Jun 24, 2004 (UTC)

A possible reason for MS to do this, as you say, is to move developers to C#. A more likely reason is that the team that built this functionality only had a limited budget and put it into the language they used the most. However, even if they were motivated as you supposed, I don't think this falls into what is gererally considered as marketing. --RanchoRosco 21:19, 25 Jun 2004 (UTC)

Well, that is a reasonable assumption except for the fact that they removed the mobile C++ functionality. MS doesn't have plans to put it back in–they are going to keep it separate. But you're right, "Marketing" probably isn't the best place for this; I just couldn't think of a better section. Frecklefoot | Talk 00:41, Jun 26, 2004 (UTC)

I think you're wrong when you say that they removed mobile C++ functionality. Could you clarify what you meant? The latest C++ compiler for mobile processors is out (version 4) and you could use managed C++ to develop for a mobile device, since it compiles to MSIL instead of native bytecodes. Feel free to correct me if I misinterpreted what you wrote or got something wrong.

I misspoke myself a little. To develop for mobile devices in C++, one cannot use Visual Studio.NET. One must download a seperate IDE. It is similar to Studio.NET, but lacks many of its features. On the other hand, one may develop mobile device applications in Studio.NET using any other language but C++. Yes, you can use managed C++, but that's just the point: why allow Managed C++ but not C++? Studio .NET is supposed to be a full-fledged C++ IDE, but one cannot use it to develop mobile applications in C++, just the .NET languages. HTH. :-) Frecklefoot | Talk 19:45, Jan 10, 2005 (UTC)

MSIL or CIL

I'm not trying to point fingers, but Onebit has been going around and changing references from MSIL (Microsoft Intermediate Language) to CIL (Common Intermediate Language). I can't find any relevant references to CIL except here in Wikipedia (after Onebit's changes). Going to MSDN, doing a search on CIL turns up pages of irrelevant information. Doing a search on MSIL brings up, amazingly, information on Microsoft Intermediate Language. Is CIL a new name change by Microsoft that just hasn't perculated through the Internet yet or is it just a mistake? I've always hear references to MSIL and have never heard a reference to CIL until today. Please post opinions and any online references. Thanks. Frecklefoot | Talk 14:51, Jun 24, 2004 (UTC)

Perhaps relevant: http://dotnet.di.unipi.it/EcmaSpec/PartitionIII/index.html uses CIL. - Bevo 17:24, 30 Jun 2004 (UTC)
CIL is very common. MSIL is used in documentation and obviously specifically in reference to .NET. CIL is the ECMA spec as mentioned above (obviously critical to the Common Language Infrastructure / CLI). Technically, the CLR is the Microsoft implementation of the CLI. Therefore, it's not incorrect to say MSIL, denoting the Microsoft runtime as a target platform. From one programmer to another, that makes sense. Of course, when you say .NET, you mean Microsoft anyway. I'm not aware of any inconsistency in MSIL from CIL spec.
Basically, MSIL is to CIL as CLR is to CLI and .NET is to CLS (Common Language Specification). I have seen MSIL/CIL, CLR/CLI, and .NET/CLS (often without the slash).
O'Reilly .NET Framework (2nd ed.) mentions MSIL only in the glossary, index, and Appendix D (Common Utilities). However I don't remember it in any of the book's chapters and all the "common utilities" (ilasm.exe, ildasm.exe, etc.) binaries are neutrally named. No hybrid names that I remember - mostly IL.
The Mono Project uses the term MSIL/CIL, according to a Google site: search. This is also used in mailing lists. That hybrid term communicates to me IL code that conforms to spec and .NET (right now an artificial difference as .NET should fully support CIL).
Microsoft documentation uses MSIL, IL, and CIL.
I would use IL in general, but we should conform to what's common. It's not good form to use MSIL to refer to all CIL (because we do have a spec and things like Mono), but I don't see anything wrong with using MSIL/CIL.
Microsoft Reference: http://msdn.microsoft.com/net/ecma/
Mono Project: http://www.mono-project.com/
Vector4F 04:47, 12 Jul 2004 (UTC)
If memory serves me, CIL is actually the *old* name. I have at least one early-release .NET book that uses the phrase CIL, but all references on Microsoft's documentation was changed to MSIL by the time the Framework was released. I'm pretty sure it was a purely cosmetic name change, that is, MSIL == CIL. Searching Google for "CIL dotnet" shows a number of references, but mostly from 2002/2003 timeframe. For all I know, MS changed the name just so they could say 'missle' when talking about their technology :) Kutulu 15:02, 29 Apr 2005 (UTC)
IL is intermediate language, the problem is that it is generic and could be used widely (java .class are in an intermediate language). MSIL is the first name that this technology got, but when microsoft standardized it they needed to remove the "microsoft" (MS) part of the name, so they choosen "comon intermediate language" CIL. But the name MSIL doesn't disapear. Actualy if you speak of the 2.0 version of the platform it could be wrong to speak about CIL, because the standardized version is still the 1.0 version. Virtualblackfox 28 June 2005 22:08 (UTC)

C# does NOT use Virtual Machine

Neither "stack-based", nor any other. Therein lies its main difference between Java and .NET. Java bytecode runs on VM, .NET Intermediate Language gets compiled upon its execution and only then it is executed. VM is simply not needed in this arrangement because .NET never executes bytecode directly (though one can definitely write a VM that will execute MSIL). — Preceding unsigned comment added by 4.46.154.37 (talkcontribs) 08:18, 4 July 2004 (UTC)

But the compilation is done by a "virutal machine" of sorts: the .NET framework. Without it, you can't run a CIL (or MSIL) program. The framework is present, constantly compiling any CIL code that needs to be executed. That's close enough to a VM for me.
And, dude, sign your posts. Use ~~~ or ~~~~. The latter is preferred by most, as it adds a timestamp to your signature. :-) Frecklefoot | Talk 15:47, Jul 6, 2004 (UTC)
Actually, if I understand the technology properly, the Framework installation actually changes the native process loader for Windows platforms. There is no virtual machine involved, merely calls into the JIT compiler.
For non-Windows platforms, the similarities are much closer; you need to explicitly run the mono program on a Mono application for it to work, though I'm not sure the internal workings of that. At any rate, the original point is technically accurate that C# doesn't use a VM -- at best, .NET uses a VM and C# compiles to .NET MSIL. Perhaps that's a better way to phrase it, or leave the VM/not-a-VM discussion for the .NET article?
Kutulu 14:57, 29 Apr 2005 (UTC)
Pointless trivia: the framework does change the native process loader but it doesn't need to on 32-bit windows. A pure MSIL binary is still a standard win32 x86 binary containing a single x86 instruction: a jump to CorExeMain in mscoree.dll. The loader only needs to be changed to allow truly cross-platform MSIL binaries.
The question of whether .NET uses a VM is fairly meaningless. Both Java and .Net define VMs in their specifications. Both Java and .Net implement their specifications by JITing the byte code into native code. (And there are interpreters for both, but they are slower.) The fact that Java uses an EXE to implement its VM (so all java processes have the same name) and .Net uses a DLL (so processes have their own names) actually makes no significant difference. For example, this doesn't have any implications for security. Indeed, the fact that .Net apps on Linux run in the same syle as Java apps shows the equivalence of the two approaches.
— Preceding unsigned comment added by Reilly (talkcontribs) 15:39, 10 October 2005 (UTC)
While you are correct that .Net doesn't use a VM, but you are incorrect in assuming that all java bytecode is interpreted. Most JVMs (even some relatively early JVMs) used a JIT compiler to compile and execute some bytecode directly. Some JVMs allow JIT compilation to be turned off and a few only do bytecode interpretation. So to correctly state the matter you should say that a JVM *can* interpret bytecode while the .Net runtime cannot. See this for more: JVM Taft 21:04, 3 March 2006 (UTC)

C# Critique

I wrote a C# critique at (a dead link now) which I believe should be added to the external links. I won't add it myself because that could be construed as blatant self-promotion. — Preceding unsigned comment added by 66.130.152.126 (talkcontribs) 23:17, 6 July 2004 (UTC)

I read it, not bad. I added it to the list, but we should probably trim a few if the list gets any longer. Get too many links and the list becomes worthless. Next time, dude, sign your post (anyone can still go back in the history and see who made the post, but signing saves them the extra work). You can sign your post by using 3 tildes (~~~) or 4 (~~~~). The latter gives your signature a timestamp. If you're concerned about privacy, create an account. If you sign posts without an account, your IP address is shown. With an account, just your username is shown without any other information. Peace. :-) Frecklefoot | Talk 13:51, Jul 7, 2004 (UTC)

Have a look at the OpCodes enumeration in System.Reflection.Emit. The MSIL is stack-based. Obviously compiled MSIL is targeted to a platform. phx — Preceding unsigned comment added by 203.26.206.130 (talkcontribs) 07:19, 21 April 2005 (UTC)

Category: Java programming language family

Why was this article added to the this category? C# is not part of the Java family of languages in any formal sense -- it may have been influenced by a lot of Java features, but it was influenced by C++ and Delphi features as well. There are pretty significant aspects of the language (and especially the base class libraries) that differ from Java. I'd say this category ought to be reserved for languages that have some kind of formal relationship with Java (e.g. they compile down to Java bytecode in their standard implementation, they can seemlessly interop with Java, the language is an extensive of Java like Pizza is, and so on). Neilc 03:21, 21 Aug 2004 (UTC)

  • You are correct in your depiction of C#,Java,Pizza. However, the intention of the family categorization in Category:Programming language families is currently more lax than what you think it ought to be: it arose from recentTalk:Programming language suggestions and its purpose is to fuzzily relate languages according to their overall structure (Pascal,PL/I <-- Algol, for example; or J,K,Nial <-- APL; etc.) or "look and feel". IMO, in this last, more general sense, it is very hard to argue against the case that C#, coming after Java as it did, has a rather similar look and feel. In any case, this is surely a controversial topic. Please let me know what you think. Wish you a good day. —danakil 03:31, 21 Aug 2004 (UTC)


C# does not define any implementation details

technically C# has nothing to do with .NET, i think the article should be written with information about the standardized C# language, information pertaining to .NET software, such as the CLR or the JIT should be linked to a article on .NET or the microsoft C# compiler.

in fact the only thing in the article that is relevant to the language itself is the rather poor code example...

i am new to wikipedia, what is the politcally correct way of asserting my opinion as to the contents of this article, can i re-write it? — Preceding unsigned comment added by 24.43.174.39 (talkcontribs) 18:22, 5 December 2004 (UTC)

This is exactly the right place to assert your opinions. Thanks for not doing it in the article itself first. :-) The only thing wrong with post is that you didn't sign it (I signed it for you above). You can do this with either 3 or 4 tildes (~~~ or ~~~~). The latter is preferred, as it also leaves a timestamp. You may also want to create an account if you plan to contribute to Wikipedia on a regular basis.
I agree C# doesn't have to be about .NET, but right now it is. C# doesn't exist as an entity seperate from .NET. A software company could come out with a compiler for C# that compiles to binary, for example, but none have (yet). Right now, C# is a .NET topic. If C# becomes widespread and is used outside of the .NET realm (unlikely), than it would make sense to split the article up. But for right now, it may remain. You could mention, however, that C# doesn't have to be a .NET topic, if you like.
What's wrong with the code example? Frecklefoot | Talk 15:28, Dec 6, 2004 (UTC)
ok, sorry about the lack of wiki syntax, as you can tell i am new to wiki beyond the scope of reading.
i guess my argument is focused on the fact that, if you were writting C# for one of the other existing C# platforms (like mono, where there is growing usage) then this article largely doesn't make a lot of sense, to me an article titled C Sharp programming language should talk about the language. Implementations are certainly valid talking points, but should not the main focus be on language features, contrast and comparison to other languages, etc? a "summary" if you will of the language standards?
about the code sample, i didn't mean to be harsh, i just feel it could either be more succinct, or provide some sort of explanation to what each section is 24.43.174.39 04:33, 9 Dec 2004 (UTC)
Yes, those are valid points. The article would be better with those items. Frecklefoot | Talk 15:50, Dec 9, 2004 (UTC)

Syntax highlighting

Does anyone else feel the examples would be better/easier to read if they appeared with the syntax highlighting the MS IDE provides? Frecklefoot | Talk 15:50, Dec 9, 2004 (UTC)

Neutral - Eh. It's not standard on Wikipedia, and the examples are so simple that (hopefully) they're readable without highlighting. But I wouldn't oppose anyone who wanted to go through the trouble of highlighting all of the samples... Starwiz 02:50, Jun 10, 2005 (UTC)

Why such an ugly example?

In my opinion, the example given is not very suitable to present the nature of C#. What more, random string generation can be done more efficiently (fewer lines of code).

I would suggest giving some example manifesting C# language specific concepts such as operator overloading, polymorphism, properties, delegates, events,.. I do not want to delete the example myself and providing mine, I do not know how this is treated on Wiki

Sincerely, Marek 84.47.61.214 23:41, 8 Jan 2005 (UTC)

If you are unsure about your own example, you can post it here, on the Talk page, for review by others first. I'm sure quite a few people watch this article, so you're sure to get plenty of comments. :^) Frecklefoot | Talk 16:19, Jan 17, 2005 (UTC)
I agree, with no offense intended to the authors, that the example is ridiculously huge and inelegant. It might be a fine program but not a great first exposure to the language. How about a "hello world" for starters? Deco 04:57, 27 Jan 2005 (UTC)
I've removed the example; there is already a "hello world," which I think is good enough for an encyclopedia article. Neilc 10:53, 30 Apr 2005 (UTC)
I favour this change. Deco 20:52, 30 Apr 2005 (UTC)

Move proposal

It would seem to me that the title C Sharp is perfectly unambiguous, unless we expect articles to be written on individual musical notes in the near future. I propose a move. Any objections? (waiting 2 days) Deco 04:21, 23 Jan 2005 (UTC)

I've tried moving it, but C Sharp is in the way and can't be deleted for a while for technical reasons. Deco 05:35, 5 Mar 2005 (UTC)
C Sharp redirects to this page now, so can the move be done? Kutulu 14:52, 29 Apr 2005 (UTC)
Nope, C Sharp can't be deleted until the software is upgraded because of the block compression issue. Deco 20:54, 30 Apr 2005 (UTC)
Move is finally done! Deco 02:02, 7 Jun 2005 (UTC)

As both a musician and a programmer, I feel compelled to point out that there are articles on individual musical notes (see B (musical note)). I'm about to add a blurb to the top of the article linking to Musical notation. Does anyone object? Starwiz 02:55, Jun 10, 2005 (UTC)

That's fine with me, though I'd point out that that artilce (B (musical note)) is a stub and not a true, full-length article. But I think the notice you propose would help people who are actually looking for an article on the C# note. Frecklefoot | Talk 14:50, Jun 10, 2005 (UTC)
Agreed. However, this page should remain the primary topic — this should not become a disambiguation page. A good many more people are liable to want to know about C# the programming language than C# the musical note. Deco 07:53, 12 Jun 2005 (UTC)

"CLR" is used without being defined

This should be de-acronymed and defined. — Preceding unsigned comment added by 71.35.0.241 (talkcontribs) 23:50, 4 March 2005 (UTC)

The CLR is the Common Language Runtime. This allows multiple languages to be 'compiled' to a standard in which the JIT (Just-in-Time) compiler can interpret. — Preceding unsigned comment added by 207.232.98.235 (talkcontribs) 19:35, 9 March 2005 (UTC)

MI?

From the article:

As in Java, only single inheritance is available, but a class can implement any number of abstract interfaces. This functions mainly to simplify the runtime's implementation.

Is there a reference for the claim that the lack of MI is "mainly" for the purpose of simplifying the runtime implementation? I would think a major reason for not including MI is that some people consider to be too complex, implementation trickiness aside. Neilc 05:16, 1 May 2005 (UTC)

Well, the implementation of CLR is one problem, CLS compliance is the another. We cannot tell which is the main problem, but C# as the "mainstream .NET language" can not (and should not) support multiple inheritance. An interview with Eric Gunnerson about this issue can be found here http://www.artima.com/intv/dotnet.html 84.47.7.5 00:06, 7 Jun 2005 (UTC)
The fact that C# does not implement MI is because it has no choice, because the CLR does not (and it would be gruesome to implement it on top of the CLR). The reason the CLR does not, on the other hand, has nothing to do with language feature complexity, because C# could still have chosen to drop MI even if the runtime supported it. On the other hand, I suppose they might have reasoned that they have no intention of building a language with MI on top of the CLR, so that was part of why they chose not to support it. Deco 01:58, 7 Jun 2005 (UTC)


Timeline

I think it is interesting to know things like when C# 1.0 first came out and when the standard was accepted. Hirzel 09:11, 16 July 2005 (UTC)

Title

From the official Microsoft FAQ on the language [4]:

Q. What is the symbol in the name "C#"?
A. It's not the "hash" (or pound) symbol as most people believe. It's actually supposed to be the musical sharp symbol. However, because the sharp symbol is not present on the standard keyboard, it's easier to type the hash ("#") symbol. The name of the language is, of course, pronounced "see sharp".

So I have moved the article back to the name it's "supposed" to be.

Also, Unicode Character 'MUSIC SHARP SIGN' (U+266F) ♯ is in fact a proper UTF-8 symbol [5]. Nohat 18:40, 1 August 2005 (UTC)
But users can't type the proper symbol, so they would not be able to search for it. UTF-8 or not, it still does not show up properly in anything but Firefox. At the very least just use <sup>#</sup>. -- Foofy 19:56, 1 August 2005 (UTC)
Anyone can type it by using "Character Map" or an appropriate keyboard layout. Mac users can type it using the Character Palette. Equivalent utilities exist for other platforms. But it's not even necessary for users to type it because all the redirects still work correctly. It shows up perfectly fine in Windows Internet Explore, Firefox for Mac and Windows, and Safari for me. # is not an approximation of the correct symbol at all. The vertical lines in the sharp symbol are strictly vertical and the horizontal lines are at a slight angle; in the hash symbol, the horizontal lines are straight and the verticals are at an angle. Superscripting the hash symbol just makes the incorrect symbol smaller. We use correct typography like dashes, International Phonetic Alphabet, Katakana, etc. on many pages on Wikipedia even though some older browsers don't display it correctly. Why should this article be any different? Nohat 20:11, 1 August 2005 (UTC)
Screenshots here and here. I get the same on a few different computers, all using plain out-of-the-box installations of Windows 2000, XP, and 2003. Also it still can't be typed for search purposes. Foofy 20:27, 1 August 2005 (UTC)
As I explained, yes it can be typed using the character map utility, but that doesn't matter because you can search for "C sharp" and you will still get this page. The reason a search for "C♯" doesn't return anything useful presently is because the search index hasn't been updated with the proper typography, and likely won't if you keep reverting. A search for "C#" doesn't work either, mind you. The problem with IE is a lack of adequate font coverage, and nothing can be done about that until MS starts making fonts that have complete character sets with default installs. There are many pages on Wikipedia that have characters that are not included in default Windows installs, and nobody is up in arms about how some IE users may have some trouble with them. Why is this page special? Nohat 20:54, 1 August 2005 (UTC)
I am "up in arms" about all of them, as I'm sure you're aware. Others might tolerate characters that don't render for most of our readers in the body of a technical article, but in the title? It looks like it just says "C"; the other character is invisible. We should certainly not have page titles including characters that do not print on browsers comprising a large majority of our readership. I am moving this page back, again. Deco 01:14, 3 August 2005 (UTC)

For what it's worth, I can cite considerable precedent in this matter.

Is this an Encyclopedia of the Few? We must consider our readers' needs, not callously insist they upgrade their browser, because they won't, they'll just not read our encyclopedia. I will absolutely not tolerate the title that you desire, despite the fact that it is technically more correct. Deco 01:27, 3 August 2005 (UTC)

One last point: the name "C#" would be incorrect, but the name "C Sharp", currently in use, may be seen as a transliteration of the correct name. Deco 01:42, 3 August 2005 (UTC)
You need to fix all the double redirects when you move a page. For someone who claims to have so much concern for our readers, you don't seem to care much that a great many of the links to this page no longer work properly. Nohat 04:48, 3 August 2005 (UTC)
Done -- Chris 14:47, 3 August 2005 (UTC)
I assumed you were going to move it back, so I was going to wait until this discussion had stabilized before churning lots of linking pages back and forth. Sorry for any inconvenience that this may have caused anyone. Deco 18:25, 3 August 2005 (UTC)

I have added a section, Language name, which hopefully explains the sharp character issue and reduces reverts/renames of this article. -- Chris 19:05, 18 August 2005 (UTC)

Well, I'm unhappy with the change. What's so special about the Sharp symbol anyway? Does it look like this: # ? If so, we can just do that (<sup>#</sup>) instead of using non-universal characters. That's my input. Right now, to a lot of readers, it looks like we are saying the correct character is a block. Frecklefoot | Talk 20:57, August 18, 2005 (UTC)
The only thing special about it is that it is the technically correct symbol, according to Microsoft. Part of my mod was to leave the symbol in only two places: in the wrongtitle template, with a corresponding note stating that it may not be visible in all browsers, and in the new section. The rest of the article uses the hash mark. Also, everywhere the symbol appears it is followed by the text "sharp symbol" so that those who cannot see it are not left hanging. To address, <sup>#</sup>, it is still not a sharp symbol. In the sharp symbol, the left-right lines are slanted and the up-down lines are truly vertical [7]. As to it being non-universal, see Nohat's note above and this link; it is universal, just apparently not well-supported. Ultimately, if you still feel unhappy about it, change it back; I certainly won't revert. But please take into acccount that the symbol only appears in a few places and is then noted that it may not be visible. -- Chris 20:27, 19 August 2005 (UTC)
I'm happy with how it is now. I'll just pray the next C-based language isn't named C followed by some Chinese character. Deco 05:07, 20 August 2005 (UTC)
In the Yeeeear Two-Thousannnnd...
...entire wikipedia articles, consisting entirely of characters and symbols your web browser has no chance in hell of displaying, will be written from scratch and promptly achieve featured article status, much to your chagrin.
FREAK OF NURxTURE (TALK) 15:34, August 29, 2005 (UTC)

I think it should be moved to C♯, especially since we can't have an article at C# due to technical limitations. —Ævar Arnfjörð Bjarmason 16:36, 28 September 2005 (UTC)

Since ECMA (not MS) owns the language, we use their name ("C#") instead of MS's ("C♯") where it is technically feasible, right? Or did I miss a discussion where we decided to use MS's name instead of ECMA's. The Rod 16:28, 6 December 2005 (UTC)
That comment was made before I was fully aware of the facts of the matter, see my comments below. —Ævar Arnfjörð Bjarmason 20:53, 3 January 2006 (UTC)

C♯ or C# (again)

There is a notice at the top of the article stating that the correct title is C♯, and later in the article it's mentioned that Microsoft states that C♯ is the correct name [8], however according to the ECMA-334 specification it's C#, I think we should go with the standard and not a Microsoft FAQ. —Ævar Arnfjörð Bjarmason 02:11, 11 October 2005 (UTC)

The article now uses the math template to attempt to give the correct title ("wrongtitle|title=C"), but the math template expands to HTML with an image tag in it ("C<img class='tex' src="/math/7/8/1/7818bf5748ed97579507cd14a1d5bb65.png" alt="\sharp" />"). I do not think that author intended to say that the correct title of the article should include an image, but rather that the correct title of the article should include a sharp sign. Even that statement, though, is contrary to the ECMA spec, as noted above by Ævar. Best would be to revert to the one with the hash/pound sign (#) (or possibly to the opera-incompatible "wrongtitle" note with the sharp sign (♯)), right? The Rod 19:53, 2 December 2005 (UTC)

I think if we have conflicting sources we should go with the most convenient one for us, which would be the symbol supported by all browsers. No reason not to mention what the FAQ says though. Deco 00:24, 3 December 2005 (UTC)
I have added this edit war to Wikipedia: Lamest edit wars ever. It's just such a silly thing to fight about. :-) Deco 19:08, 6 December 2005 (UTC)
Awww, come on! This is the name of the language we're talking about! Isn't that important?!?! Think of the children!!! <g> - Chris 02:12, 12 December 2005 (UTC)
Oops. I didn't intend the wrongtitle reversion as part of an edit war. I thought the reference to ECMA's spec after the other #/♯ discussions settled the matter. If anyone now thinks the ECMA spec is inappropriate, wrong, misinterpreted, or non-authoritative, please say so. I'll consider this issue a difference of opinion and stop reverting the wrongtitle. Otherwise, wrongtitle edits to "C♯" appear unaware of the "6. Acronyms and Abbreviations" section of ECMA spec 334 [9]. The Rod 19:59, 6 December 2005 (UTC)
As I suggested on your talk page, I must relent on my opinion that the actual sharp symbol is correct. ECMA would, indeed, have ultimate say in the matter as I understand the development of the language. In this vein, I would like to start a discussion on the language as it relates to ECMA, ISO/IEC, and Microsoft. I'll start another section here to discuss (perhaps the discussion will not take very long) on the "ownership" of the language and how it was developed to standardization. I'd love to get your input, as well as all others. - Chris 02:12, 12 December 2005 (UTC)
The following e-mail message from Microsoft Customer Support supports calling the language "C#":

From: Microsoft Contact US [10]
Sent: Tue 12/13/2005 1:04 AM
To: Rod Smith
Subject: RE:'RTCProd=010-149-035' Name of C# language

Hello Rod,

Here is an update on your concern.

The spoken name of the language is "C sharp" in reference to the musical "sharp" sign, which increases a tone denoted by a letter (between A and G) by half a tone. However, for ease of typing it was decided to represent the sharp sign by a pound symbol (which is on any keyboard) rather than the "musically correct" Unicode sharp sign. The Microsoft and ECMA 334 representation symbols thus agree: the # in C# is the pound sign, but it represents a sharp sign. Think of it in the same way as the <= glyph in C languages which is a less than sign and an equals sign, but represents a less-than-or-equals sign.

Did I completely answer your question? Please let me know by replying to this message.

Also, please feel free to reply if you have other concerns.

Thank you,

Rose
Microsoft Online Customer Service Representative

If you have any feedback about your Online Customer Service experience, please e-mail my manager, Oruen Salazar, at [email protected].

So, MS and ECMA do agree on the official written name of the language, but the # symbol "represents" the ♯ symbol. The Rod 16:46, 13 December 2005 (UTC)
I'd say this puts it to bed. Thanks for the e-mail. - Chris 08:10, 17 December 2005 (UTC)
Instead of what we have in the Language name section now, would you mind responding to that e-mail and request that we be allowed to use their response as MS' official statement on the subject? Either that, or request that they change their FAQ if it is indeed "inaccurate" as you put it? (CC'd to your talk page) - Chris 20:14, 17 December 2005 (UTC)
Following is MS's approval:

From: Microsoft Contact US [11]
Sent: Sun 12/25/2005 1:21 PM
To: Rod Smith
Subject: RE:'RTCProd=010-149-035' Name of C# language

Hello Rod,

This is an update regarding your issue. I apologize for the delay in our response.

Yes, you may post our response. We do not have any problem with Wikipedia posting it. Did I completely answer your question? Please let me know by replying to this message.

Thank you,

John Paul
Microsoft Online Customer Service Representative

If you have any feedback about your Online Customer Service experience, please e-mail my manager, Oruen Salazar, at [email protected].

I updated the article with their explanation, but I don't know how to cite the e-mail message, as it has no URL. How are e-mail messages cited? The Rod 16:46, 27 December 2005 (UTC)
In research papers I sometimes see "Private correspondence with author" or some such thing. You could post the e-mail to a subpage and use an internal link, although there isn't precedent for this as far as I know. Be careful, though, because the representative didn't explicitly release his e-mail under the GFDL. Deco 22:12, 27 December 2005 (UTC)
I would put it in a text file, then upload the text file to Wikipedia (like you would a picture) and then create a link to it. JesseHogan 01:24, 28 December 2005 (UTC)

Holy carp! I didn't even KNOW there was a difference between sharp and pound. You learn something new everyday.

Regardless, I still choose to type # when I mean sharp, simply because I don't like typing non-keyboard characters. Viltris 02:19, 6 January 2006 (UTC)

Suspicious naming fact

I noticed this fact in the naming section:

Another name for the # symbol is "octothorpe", which when combined with a hard C sound, results in the pronunciation "cock-toe-thorp". This form, spoken emphasising the first syllable, is occasionally used as an expletive by programmers.

As crass as programmers are, I find this a little difficult to believe. Anyone have a reference? Deco 00:25, 3 December 2005 (UTC)

I have not received any reply in two weeks, and so I am removing this claim. Deco 20:44, 16 December 2005 (UTC)
I don't know about the specific claim, but the ANSI name for the # character is octothorpe. — Preceding unsigned comment added by Geo Swan (talkcontribs) 04:57, 17 December 2005 (UTC)

Standardization and "ownership" of the language

As part of the on-going difference of opinions on the name of the language (of which I think I have the least popular one), I'd like to get a better understanding of how the language came to be. I understand that Microsoft "submitted C# to the ECMA for formal standardization", but what does this mean to the evolution of the language? I have always assumed that Anders Hejlsberg created the language while employed with Microsoft. But who commissioned it? How was it "born"? Who started the standardization process? Did Microsoft go to ECMA or the other way around (I assume the former)? And, in the end, who "owns" the language? - Chris 02:23, 12 December 2005 (UTC)

The question of "ownership" seems impossible to answer. The ECMA standard defines the language, but not the extended C# implementation published by Microsoft, and Microsoft's is really the only implementation of the language (other than the incomplete open-source ones). I don't think anyone has the power to decide how the standard must be interpreted in particular situations, but there are certainly figures whose opinions are respected, such as Hejlsberg. Deco 05:24, 12 December 2005 (UTC)
Good comment Chris. However, why do we have to assume that it was ECMA who approached MS? Cheers -- Svest 21:20, 21 December 2005 (UTC)  Wiki me up&#153;
Indeed, it seems I can see nothing to support that assumption. As well, from reading a few more articles, I see nothing but the standard line about the language being developed by Hejlsberg at Microsoft. - Chris 14:31, 28 December 2005 (UTC)
That would mean that he got paid for that job! In other words, as long as there are no information about how Hejlsberg started developing the language, in case he did before joining MS, we must say that the language was developed by MS. Cheers -- Szvest 18:08, 28 December 2005 (UTC)  Wiki me up&#153;
I think only a part of C# is standardised via ECMA (the core of the language, and not for example the Forms, etc... parts that are specific to the MS environment (still can be emulated, but may be not so simply). Why not adding this sort of information on the "Standardization" section ? Hervegirod 09:51, 14 May 2006 (UTC)
Because it's wrong. Windows Forms are part of the .NET framework, not C#. --Craig Stuntz 13:11, 15 May 2006 (UTC)
It seems that the ECMA standardization of C# is adressing the VM and syntax part of the language, and not its librairies. The ECMA standard states that The Standard specifies: The representation of C# programs, The syntax and constraints of the C# language, The semantic rules for interpreting C# programs, The restrictions and limits imposed by a conforming implementation of C#. If I am right, it should be fair to explain this in the standardization section. I agree that most of the libraries are part of the .NET framework, but the libraries are also important for the users. Hervegirod 19:02, 15 May 2006 (UTC)
Not "most of the libraries," all of them. I don't know of any parts of the C# language which are "specific to the MS environment." However, it might be worth noting that the C# and BCL standards are widely confused, and that many people presume that things which are actually part of the BCL are parts of C#. --Craig Stuntz 19:10, 15 May 2006 (UTC)
you are right, the bunch of terminologies (.NET, C#, CLI, CLR, etc..) can create some confusion, it is also the case in Java (JDK, JRE, VM, Java, bytecote), but I think it is more confusing in C#, because there are more acronyms Hervegirod 20:03, 15 May 2006 (UTC)

"C Pound"

  • This # is a pound sign. Every person I talk to says C Pound. Can we please change this?--God of War 18:51, 3 January 2006 (UTC)

It sounds like you'd like something in the article to change regarding the way to pronounce the name of the language, but I don't understand whether you want to change the article to agree with your acquaintences' pronunciation or to warn people like your acquaintences to say "C Sharp" instead of "C Pound". If you want the former, the place to take up your argument is with the ECMA, the owners of language specification, as they say it's pronounced "C Sharp". If you want the latter, that's already in the Language name section. The Rod 20:47, 3 January 2006 (UTC)

Change your friends? That's your job! Tell them to stop pronouncing "C++" as "C increment" while you're at it. :-) Deco 02:24, 6 January 2006 (UTC)

The pronunciation of "Sharp" comes from music, where saying "A#" would be a change from the 'A' note. http://en.wikipedia.org/wiki/Sharp might explain it a little better.Mr.hotkeys 04:47, 26 April 2006 (UTC)

# sign

Why are article titles not allowed to have the # sign?? Georgia guy 19:31, 15 January 2006 (UTC)

Because HTML URLs reserve it to separate a page name from an anchor name created by the A REF tag. Deco 20:04, 15 January 2006 (UTC)
Click on a link in a table of contents, and see how it is used in the URL.--Max Talk (add)Contribs 00:59, 7 February 2006 (UTC)

Confusing

This edit added {{confusing}} to the article without any discussion on the talk page. What is confusing about this article? The Rod 22:14, 14 February 2006 (UTC)

I agree, I don't see anything confuding in the article. Trifon Triantafillidis 11:16, 15 February 2006 (UTC)


Java as a proprietary language

I removed the reference to Java as a proprietary language in the Politics section. Given that Java has a community process which directs its progress as a language (The Java Community Process; see also http://www.jcp.org/en/home/index), it either deserves mentioning or we should choose more clearly proprietary languages as examples. No need to introduce needless controversy. :) Taft 22:36, 6 March 2006 (UTC)

Dates

Some dates, such as when the language was first released, would be nice. Dan100 (Talk) 18:08, 27 March 2006 (UTC)

Contradictions Between Articles

There's a significant and obvious contradiction between the C# vs Java article and the main C# article, specifically, about garbage-collection. The main article states, "A common misbelief is that they are garbage-collected, though they are not; they are true value-types and are stack allocated (with an exception for System.Object, and due to interning, System.String)." while this article begins, "As two modern garbage-collected runtime-compiled languages derived from C and C++, Java and C# are very similar."

I'm not familiar enough with the lanugage to fix this myself, but wanted to note it for others to take a look at.

Cross-posted to the Comparison of Java and C# talk page. —The preceding unsigned comment was added by 65.100.221.52 (talkcontribs) 2006-04-10 05:28:23 (UTC)

There is no contradiction betwen those two correct statements. Like Java, C# implements garbage-collection for objects allocated from the heap. The local value type variables to which the C# article refers need no such heap allocation since they are kept on the stack. The compiler takes advantage of the limited lifetime of those value variables and still uses garbage collection for the heap-allocated objects to which any reference variables refer (although the stack-based references themselves are freed when the method returns). The Rod (☎ Smith) 05:40, 13 April 2006 (UTC)
And like C# Java uses stack allocation for local varables. (Side note: Stack for local varables has been around forever.... cobal didn't and fortran did... of course newer versions of these language do.) Hogan 00:09, 29 April 2006 (UTC)
To be precise, the compilers of those languages use stack allocation for local variables. Obviously a compiler (for whatever language) can store variables anywhere it wants as long as the results are the same, and not all architectures have a stack as a natural part of memory (the CLR and the JVM do, obviously). Even global variables à la COBOL and Fortran could be allocated on the stack if the compiler detected the variables are live only within function calls (rather than across), but this would be difficult and error-prone and requires a closed-world assumption. 194.151.6.67 14:05, 12 May 2006 (UTC)

HTML comment near the beginning of the source says...

...per ECMA, the name is C# (C sharp,) not C box, C square (however you pronounce the character.) What does that mean?? Georgia guy 00:47, 24 April 2006 (UTC)

Issues with "Language features" section

The following text is confusing and misleading (and possibly outright wrong):

"Most of C#'s intrinsic types correspond to value-types implemented by the CLI framework. A common misbelief is that they are garbage-collected, though they are not; they are true value-types and are stack allocated (with an exception for System.Object, and due to interning, System.String)."
  • Instead of garbage-collected, I believe that the phrase should be heap-allocated. The issue is not how they are finalized (manual/reference-counted/garbage collected), but where they are allocated (stack or heap). Value-types are generally placed on the stack, but can be automatically boxed and placed on the heap (and therefore garbage collected).
  • Since (almost) all types—even value types—technically inherit from System.Object, I think the mentioning of System.Object is awkard
  • I don't see how interning causes System.String to not be stack-allocated. System.String is heap allocated because it is a reference type instead of a value type. Interning means that the compiler/runtime will try to share instances for equal strings (string x = "Foo"; string y = "Foo"; //x and y reference the same object because of interning). It has nothing to do with stack allocation or garbage collection. Perhaps what is meant is that interned strings may not ever be garbage collected, which may very well be true, but seeing as many strings are not interned, I think this may be irrelevant.
  • Also, there's a difference between primitive types and value types in the CLI, and the primitive types are not the same as C#'s intrinsic types, either. For example, System.IntPtr is a primitive type to the CLI, but there's no intrinsic type for it in C# (it's treated like any other struct, although the compiler may do some optimizations). On the other hand, System.Decimal is not a primitive in the CLI, but C# treats decimal as if it were, to the point of allowing "const decimal" where the runtime doesn't directly support it. Whether or not strings are primitive types in the CLI escapes me at the moment. I believe that they are simply classes with a lot of special-case handling by the runtime and C# compiler, and the only special IL instruction for strings is related to loading them from the assembly.

TheMuuj Talk 09:14, 20 May 2006 (UTC)

Other parts of this article need an overhaul as well. There are many incorrect statements. For example, it is both stated and implied that C#, unlike Java, is just-in-time compiled to native code. Java has had JIT-compilation since JRE 1.2. In addition, while most (if not all) implementations of C# compile to CIL and most implementations of the CLI use a just-in-time compiler, this is not always the case. Mono provides a CIL interpreter in addition to several JIT-compilers for various architectures. Saying that C# is always JIT-compiled is like saying that C/C++ is always compiled to native code. Technically, GCC compiles to RTL, which is then converted to machine assembly. There are also C/C++ interpreters. So we need to be careful when talking about C# that we're talking about the language and not the platform which most C# code runs on. —TheMuuj Talk 09:08, 21 May 2006 (UTC)
You're right about all this. I'm not sure what the editor who added that statement was thinking. There is something of a temptation to speak of things that apply only to the primary platform, especially since there's not another article on Microsoft's implementation, but we should be careful to distinguish. Deco 19:40, 29 May 2006 (UTC)

Something more should be done (what?) to the Language features section, it says

Compared to C and C++, the language ... etc.

then comes an enumeration of features, among others:

True support for pointers ...

???

Yeah! C# supports pointers. But C and C++ are reknowned for their dare-devilish gymnastically free manipulation of pointers. So there's no difference there. Some PL comparison that was there, has been lost presumably!? /

Quaþ cowardly Anonymous Mr X, AKA [email protected].

Claim regarding RAD-ness seems questionable.

The article states that "C# was designed to fit both demands for a concise syntax (C++) and 'unlimited' rapid development (versus the 'limited' RAD of Visual Basic)."

Several assertions are packed into this short sentence:

1) C++ syntax is concise. (it supports concise expressions, but the overall syntax is arguably non-concise). 2) There is such a thing as "unlimited" RAD. (what would that mean?) 3) Visual Basic only supports "limited" RAD. 4) C# had RAD support as a design goal. (I doubt it.)

I'd like to remove the entire sentence. Any objections?

I agree. There is nothing concise about C++ syntax (it contains a great deal of redundant elements). It's evident they were thinking in comparison to VB - BASIC has always been verbose, using complete words for most of its elements. The other stuff just doesn't make sense. Deco 19:35, 29 May 2006 (UTC)

Memory management corrections

I corrected some mistakes.

1) ref counting is NOT used to detect objects eligable to GC. Other methods are used. 2) Dispose does NOT make the referring object object eligable for GC. Dispose informs an object that it should release its unmanaged resources. That's it. Leotohill 18:35, 31 May 2006 (UTC)

Wrong tone and questionable content

When combined with Windows and Web Forms and Visual Studio, it provides a scripting language with the power and performance of C++ with the ease of use and user interface design of Visual Basic for Windows and Web ASP.NET clients. It is designed to be safer, more productive, and easier to use than C++, somewhat like dull school scissors compared to sharp scissors. It is commonly deployed only in Windows environments with the large CLR runtime installed. Most sample code on the Internet is either C# or VB.NET. There is also a managed version of C++ which some have adopted for porting C++ programs such as 3D games, but source samples are scarce. If you want to develop new applications for Windows on PCs, and you have a bachelors degree in computer science, and you don't need to port to other platforms, and accept some memory and performance penalties in exchange for increased productivity, then C# is the language of choice.

I'm going to clip this paragraph out because it doesn't seem encyclopedic. If somebody wants to add it back or revert then go ahead, but the tone needs to change if stays. —TheMuuj Talk 22:18, 31 May 2006 (UTC)

Tell me about it. This is a ridiculously biased paragraph with virtually no information content, just colorful metaphors and bold unsupported claims. Thanks for cutting it out. Deco 23:39, 31 May 2006 (UTC)
I agree. Leotohill 00:00, 1 June 2006 (UTC)
I second that. -- Szvest 12:36, 5 June 2006 (UTC) Wiki me up&#153;

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)

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)

C# vs VB

Based on some discussion in the VB talk, I created a new topic for comparing C# and VB. It needs significant work, but I think it will be a valuable topic. Have at it. Gaijin42 20:02, 5 June 2006 (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)

Gtk#... a language?

This statement claims that Gtk# is a language:

The "sharp" suffix has been used by a number of other .NET languages that are variants of existing languages, including J# (Microsoft's implementation of Java), A# (from Ada), F# (presumably from System F, the type system used by the ML family), and Gtk# (a .NET wrapper for GTK+).

While I know that is not the intent, it is still a little awkward as it is. I've pondered how to reword it but I can't seem to come up with anything that doesn't read worse (although being more clear). Anyone else want to take a shot? --Chris (talk) 19:40, 11 June 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)

The Programmers joke is boring

I didn't like the section with the programmer's joke, and now its been revised to something even more convoluted and contrived. I'd like to delete it. Comments? Leotohill 03:21, 14 June 2006 (UTC)

I rewrote and shortened it. It could still use a source, though. What do you think? Deco 02:35, 14 June 2006 (UTC)
It's better. Thanks. Leotohill 03:21, 14 June 2006 (UTC)

Politics: Don't confuse C# with the .NET framework.

I've removed a couple of sentences from the section.

"The relevant patents covering the .NET implementation were released for public use. "

I'm not sure that this is true or correctly phrased. "Released for public use" is not the right language for a patent. Can anyone provide a reference to this claim about patents?

"However, the standard library provided with C#, including the extensive GUI library, is not open or completely documented, so an independant implementation which can run all programs written for Microsoft's C# would be difficult and of questionable legal basis "

C# is a specification. No library is provided with it. This statement confuses C# with the .NET framework. C#, the specification, does not require the framework. It does not even require the CLR (CLI).

We need to divide this topic into two parts, or separate topics. One is C#, the specification. This would describe the characteristics of the language free of .NET framework context. The second topic would be "Microsoft C#". This would describe Microsoft's implementation of the spec, and could freely use .NET framework elements in the examples and other text.

Leotohill 21:32, 14 June 2006 (UTC)

Also, I believe the correct name for Microsoft's implementation is "Microsoft Visual C#." Even the commandline compiler (csc.exe) refers to itself in this way. —TheMuuj Talk 21:55, 14 June 2006 (UTC)
The correct wording would be "licensed freely for public use", or something like that. Yes, parts of the article referring to Microsoft's specific implementation should be qualified as such. Deco 00:23, 15 June 2006 (UTC)

New article "Microsoft Visual C#"

Ok, I've gone and done it, that which we discussed. I've created Microsoft Visual C_Sharp. Let's work on moving all content that is specific to Visual C# to that article. LeoTohill June 17 2006

I've added a "design goals" section. It's taken verbatim from the ECMA standard. I'd usually try to avoid direct copies but a) I couldn't find any rephrasing, trimming, or expansion that would improve it and b) it's not copyrighted. Leotohill 21:29, 18 June 2006 (UTC)

In retrospect, there really is very little or nothing in this article that needs to be moved to Microsoft Visual C_Sharp. That article will probably remain quite short, just describing the distinction between this and that. But I think it's useful, and should not be merged.—The preceding unsigned comment was added by Leotohill (talkcontribs) .

Well, other than being completely incorrect, that is. "Visual C#" isn't an implementation of the ECMA spec. Visual C#, in fact, uses the compiler implementation found in the Microsoft .NET Framework — the same C# implementation used in Borland Delphi, SharpDevelop, and other IDEs. Visual C# is an IDE, not a compiler implementation. It's really something of a misnomer since the product is actually named Visual Studio, but as Microsoft themselves use the name it's OK to have it here. I scarcely know where to begin with that article. --Craig Stuntz 16:28, 5 July 2006 (UTC)
Except that when you run the C# compiler that comes with the .NET Framework, it identifies itself as "Microsoft (R) Visual C# .NET Compiler." So the .NET Framework comes with the free Visual C# compiler (even though the name "Visual" is dubious), and various Visual C#/Studio products (Express, Standard, Professional) come with IDEs for running the compiler. I do fully intend to contribute to both this and the Microsoft Visual C# articles in the future, and having to re-split the information will be a huge pain. I'd say that if anything Visual C# should be merged with Microsoft Visual Studio, but then the information would be harder to find. —TheMuuj Talk 19:23, 5 July 2006 (UTC)
MS's utter self-confusing regarding the names of ".NET"-branded products are a matter of public record. But it's clear from the MS link I give above what MS means when they talk about "Visual C#" in general. I agree that merging VC# and MSVS makes sense. The correct place to discuss MS's compiler, in my opinion, is in Microsoft .NET Framework, since the framework is the only place to get it, with or without VS. Oh, and some original research: I have it from sources I trust that a number of people involved with Visual Studio never really considered the fact that other people would make an IDE for .NET. This actually explains quite a bit, like the fact that the WinForms designer comes with the framework, but the designer for WinForms on Compact Framework does not. --Craig Stuntz 20:20, 5 July 2006 (UTC)
Craig, the url you provided has a lot of content. Can you be more specific about what part of it supports your opinion? I see only statements for the opposite, such as this at http://msdn.microsoft.com/vcsharp/learning/default.aspx
"  Before you can get started writing any code at all, you are going to need some software. Generally speaking you need two things:
   * The Visual C# compiler to turn your programs into running applications. This is available as part of the .NET Framework SDK (a free download)
   * Some form of editor or IDE (Integrated Development Environment) in which to write your code."
They seem to be clear about it: Visual C# is NOT the IDE.
Leotohill 21:49, 5 July 2006 (UTC)
Also, Craig, I think that you are incorrect on another point. The .NET framework does not include the C# compiler. The content of the framework is clearly defined in .NET Framework, and can be verified at http://msdn.microsoft.com/netframework/gettingstarted/default.aspx . The C# compiler is included in the framework Software Development Kit (SDK).
Leotohill 22:07, 5 July 2006 (UTC)
I'm almost certain that you get the C# and VB compilers when installing just the .NET Framework. I don't install the SDK on most machines, and often rely on being able to use notepad and csc.exe in a pinch. With .NET 2.0, I believe MSBuild comes with the framework, whether or not it is actually a "part" of it (it's in the Microsoft namespace instead of System, for starters). —TheMuuj Talk 22:30, 5 July 2006 (UTC)
That may be true - I'll have to test that on a clean machine. But in any case, since the MS doc is very clear about the definition of the fw, and that definition does not include the compiler(s), I don't think the fw topic should include MSVS.
Leotohill 00:12, 6 July 2006 (UTC)
I actually intended to say the SDK when I said "framework," although I believe TheMuuj is correct that it's included with both. As for links from that page supporting what I say, well, [12]. But yes the SDK is where nearly all IDEs supporting C# on Windows get the compiler, including Visual Studio. --Craig Stuntz 00:24, 6 July 2006 (UTC)

Reverted Removal of "C Pound"

I reverted the changes by 70.17.32.75 that removed a sub-section about how C# is sometimes pronounced (see C_Sharp#Language_name). I don't think the edit was vandalism, but I don't think it should be removed without discussion, either. Feel free to remove it again, but include an explanation of why it should be removed. I have heard people refer to the language by the names mentioned, so it is not a factual error. However, if the information is not encylopedic or otherwise violates policy, then by all means re-remove it. —TheMuuj Talk 05:48, 20 June 2006 (UTC)

I think it should be removed. It's trivial and distracting. (perhaps move it to a "Trivia" section?) Also, I never heard the symbol referred to as "gate". Maybe it is, but not enough to cause confusion. Leotohill 11:56, 20 June 2006 (UTC)
Trivia sections are the garbage pile of Wikipedia. Since its inception, C# was always defined (and publicized) as being pronouced "c-sharp". Any other pronounciation as always been done after-the-fact and jokingly. --Spookfish 02:47, 20 July 2006 (UTC)

System.Console is not technically an Object

The Hello world example section states:

Console is a system object, representing a command-line console where a program can input and output text.

This may be a bit pedantic of me, but technically Console is a static class, and therefore there is never an "object" of that type. This is different from Java, where System is the static class and Console() returns an object, but in .NET, Console mostly consists of helper methods that call methods on Console.In and Console.Out. It's probably helpful to think of it as an object, and the design is a simpler way to implement the singleton pattern (rather than something like Console.Instance.WriteLine). But is it correct to call it an object? I don't know how to change it without making it confusing, so I'll leave it as is. —TheMuuj Talk 21:50, 21 June 2006 (UTC)

Speaking of "pedanticity," there is no System.Console() method in Java. There are three fields of System: in, out, and err (which can be reassigned to redirect output/input/error). --Chris (talk) 23:10, 21 June 2006 (UTC)
Actually, there is (or will be) a System.console() method, but it appears to be still in draft. (See JDK 1.6 Spec). I did get the capitalization wrong, but that was out of habit. —TheMuuj Talk 23:24, 21 June 2006 (UTC)
Why are you comparing currently released .NET aspects with yet-to-be-finalized aspects of a still-under-development Java? Secondly, static class methods can be thought of as methods of a singleton (global instance) object of that class. The concept of "object" doesn't just apply to class instances... a Java "Class" instance is proof of that since there can only be one instance of it per class definition. --Spookfish 02:31, 20 July 2006 (UTC)
I'd be ok with changing it to "Console is a system class, ..." Leotohill 03:48, 22 June 2006 (UTC)

I don't think this will ever happen, but...

What if someone creates a language called C Flat?? What would the symbol be?? Georgia guy 23:26, 7 July 2006 (UTC)

Any serious computer language takes a lot of effort to develop. No serious developer(s) would go to that trouble to only then call it some joke/pun-on-words name. It would certainly result in no one taking it seriously enough to do any major development with. --Spookfish 02:52, 20 July 2006 (UTC)
I would imagine "Cb." Or "B" if you wanted to be really clever. —TheMuuj Talk 02:08, 8 July 2006 (UTC)
Ah, but there already was a B. Deco 02:36, 8 July 2006 (UTC)
So C-flat would be a .NET implementation of Bell Labs B? —TheMuuj Talk 02:55, 8 July 2006 (UTC)

External Links and spam

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 01:16, 27 July 2006 (UTC)

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)

Inclusion of C# Online.NET in external links - consensus?

User User talk:71.252.197.197 has spent the last five days inserting this link [13] in the C# and Microsoft .NET Framework pages. He argues that his website is more relevant than the other thousands of C# websites out there. I don't have a problem with that, but someone other than him/her must also agree that the site is encyclopedic and relevant enough to be included in the list of external links. Any takers? -- klaus

That's any unfair characterization of my argument. It's not that it's more relevant than all the other sites, simply that it is relevant.--70.104.16.183 17:24, 18 October 2006 (UTC)
I should add that the site is not even indexed by Google [14] -- klaus
Not so, Klaus. --70.104.16.183 17:20, 18 October 2006 (UTC)

The site does not appear "commercial" at first glance (no ads, etc, though it may be used to advertise certain books). To be honest, I'm on the fence about this one. It's probably something I would use once the site has more content. It seems to properly distinguish between C# and Visual C#, so it is a candidate for this article. But really I don't know. (It's worth mentioning that the site doesn't use a free license on the content -- they reserve all of the content under their copyright. This isn't relevant to inclusion, just something interesting to point out.) --Chris (talk) 19:05, 27 July 2006 (UTC)

It's a bit of a two edged sword, Chris. No links, no traffic, no content--for a wiki-based site. Besides, you must be used to vast sites. I think almost 1,300 pages in a few months is pretty good and fast growing. --70.104.16.183 17:20, 18 October 2006 (UTC)

Would someone explain to me why this link does not meet the criteria

why this link does not meet the criteria for external links:

  • C# Online.NET - free, wiki-based C# and .NET encyclopedia and forums

but these do:

--70.104.16.183 17:20, 18 October 2006 (UTC)

Personally, I'd say that neither is sufficiently relevant. I don't think we need more than one "community" link anyway, and that one should preferrably be the most prominent C# community site. Those are often wikis, true (consider CLiki), but apparently not in this case (yet, anyway). Considering how fast wikis tend to grow, it would get some leeway in my opinion if it were a true wiki, but it's neither Free (copyright to all contributions is assigned to creators of that page, and they explicitly reserve the right to deny access to information to anyone they please, and use it for any purpose, including commercial) nor ad-free (plenty of Google text ads). So, my say would still be no. And remove the other two links as well, unless someone gives a convincing reason for why they are there. -- int19h 05:23, 20 December 2006 (UTC)

Possibility of weak typing

It is obvious C# is normally strongly typed, but doesn't it allow for weak typing using the implicit type casts a programmer can specify? Shouldn't we note that in the Typing discipline part of the box at the top of the page? --85.145.148.191 02:46, 30 July 2006 (UTC)

I thought that it was generally accepted practice for implicit casts to only be used for widening conversions, which really doesn't make C# any more weakly typed. Most strongly-typed languages allow for widening conversions, because there's less potential for bugs to spring up. There is the possibility of writing a Variant-like class that's like a tagged union and can be implicitly cast to any of the primitive types, but I still don't think that would make C# weakly typed, because you'd still be explicitly specifying the casting behavior somewhere in code. So the weak type behavior would still be limited to classes that are designed that way, and not any classes/types. —TheMuuj Talk 04:45, 30 July 2006 (UTC)

Actually, it's quite possible to do (limited) tagged variants with implicit casting in C#, by defining implicit conversion operators. Consider this code:

struct Variant
{
  private object value;
  
  // int
  
  private Variant(int value)
  {
    this.value = value;
  }
  
  public static implicit operator Variant(int value)
  {
    return new Variant(value);
  }
  
  public static implicit operator int(Variant v)
  {
    return (int)v.value;
  }
  
  // string
  
  private Variant(string value)
  {
    this.value = value;
  }
  
  public static implicit operator Variant(string value)
  {
    return new Variant(value);
  }
  
  public static implicit operator string(Variant v)
  {
    return (string)v.value;
  }

  // ...
}

So it can certainly be done for a finite set of types (i.e. all primitive types). Unfortunately, since there's no way to define generic conversion operators, you cannot do something like boost::variant in C#, nor can you make a variant type which could be implicitly converted to/from any other C# type. -- int19h 07:35, 15 October 2006 (UTC)

"The public static void portion is a subject for a slightly more advanced discussion."

Then either link to one, or provide an external link! Loganberry (Talk) 03:15, 9 September 2006 (UTC)

Microsoft's implementation

We say both:

This article describes the language as defined in the ECMA and ISO standards, and avoids description of Microsoft's implementation. For a description of Microsoft's implementation, see Microsoft Visual C#

and

the Microsoft implementation of C# is by far the predominant one, and this article describes its characteristics and behavior, unless noted otherwise

This is confusing, and somewhat contradictory. — Matt Crypto 11:38, 25 September 2006 (UTC)

I tried to make the article focus more on the ECMA standard and less on MS quirks in the recent cleanup edit, so I've removed the "this article describes its [Microsoft's implementation] characteristics and behavior, unless noted otherwise" statement and "contradictory" tag for now. But I'll appreciate if someone takes another look and checks if nothing of a kind has managed to slip past. -- int19h 12:33, 28 September 2006 (UTC)
Thanks for looking at that, cheers. — Matt Crypto 19:39, 28 September 2006 (UTC)

XML Documentation?

Should this page mention the XML documentation mechanism? What is that called, anyway? I don't think that the XML documentation is specific to Visual Studio, either; it was mentioned in an appendix of the C sharp standard, as a recommendation, I think or something like that. 68.198.48.49 03:21, 14 October 2006 (UTC)

Yes, it is part of the standard, so it should probably go in here as well as the Java/C# comparison page. I'll try to come up with something. -- int19h 07:19, 15 October 2006 (UTC)
I've done it. The section is pretty minimalistic as it is. Does something like this deserve its own article? Javadoc has an article. 68.198.48.49 18:37, 23 October 2006 (UTC)
I've expanded it a bit with info about standardization. Even so, it's pretty short (which is perfectly okay - we're not describing the language in detail here), so I don't think a separate article is worth the bother. Not sure why Javadoc has one, actually - it looks like it would be better placed in the main Java article. -- int19h 07:28, 24 October 2006 (UTC)
There's also the question of whether or not linking to other documenters, even by way of an example (I'm thinking of NDoc here), might not also be a good idea. NDoc, in my humble experience, is a pretty popular way of doing code documentation and adds a few tags to the "standard" which one can find in sample code occasionally. Whether it's popular enough to be characterized as a de facto 'standard' is another matter. Does it matter if one points to examples where NDoc tags seemed which were not implemented in .NET Framework v1.1 seem to have been embraced in v2.0 & later? ross613 19:40, 25 January 2007 (UTC)

"He can be cited in interviews"

Does anyone else find this wording strange: "He can be cited in interviews and technical papers as stating flaws in most major programming languages". Is there a better way to say this? I can't think of one off the top of my head though. Timbatron 04:59, 23 October 2006 (UTC)

Factual Error

"EMCA" and "ISO" standards are unadopted standards. C# is a Microsoft product; any other variations can not be considered C#.

What, are you next going to replace the Microsoft Windows article with an article about WINE and then put 'Microsoft's implementation' in a different article? —The preceding unsigned comment was added by 137.45.72.17 (talk) 02:11, 13 February 2007 (UTC).

I don't understand what you are trying to say here, or what you mean by "unadopted standards". Leotohill 02:31, 13 February 2007 (UTC)
C# is a language standardized by ISO and ECMA. Microsoft product is called Visual C#, and it fully implements those standards. Other implementations of the standards are Rotor by Microsoft, and Mono and DotGNU by third parties. With four widely known implementations in existence, I fail to see how the standards are in any way "unadopted". -- int19h 06:26, 13 February 2007 (UTC)

C# - play on words?

The term C# is a play on words similar to the language name C++: the expression C++ in the language C means C incremented by one, and the author of C++ named the language C++ in reference to its incremental improvement over C, while the sharp in 'C#' implies that it is a 'step up' from C. A sharp symbol can be broken apart into four plus signs, so the name C# might be rendered as C++++, and the meaning being that it is C++ incremented by one.

There's no source for this. Is this original research? - furrykef (Talk at me) 19:42, 12 March 2007 (UTC)

Good for you, for removing it. All these theories about the meaning of the name are just speculation, afaikt. Here's another one: "The name is meant to suggest 'see sharp(ly)', as in having acute vision or knowledge." I just made that up, but it's as good as the others. Wait, here's another: "The name is a double pun on 'The sea is flat'" . It means that C# is the language for navigating seas that are not flat (i.e., are sharp)." Wait, here's another... oh, never mind. Leotohill 01:18, 13 March 2007 (UTC)

The fact that two themes of logic come together in this way does not have to be original research. Too quick to delete is the privaledge of the not so bright. I would be happy to ready sharp (ly) and the 'sea is flat' but doing it in discussion RoddyYoung 09:16, 31 March 2007 (UTC)

This section keeps being re-added with sources that are not reliable. All of the sources I have seen are tutorials making speculation along the "someone once said..." lines. This is not an appropriate citation. We have an email from Microsoft, the authority on this subject, stating definitively where the name of the language comes from -- this is a primary source. I will continue to remove content that claims that "#" is made up of "++++" unless there is a proper citation. --Chris (talk) 16:18, 6 May 2007 (UTC)

C# is actually a recycled project name at Microsoft. There was a language development project at Microsoft from 1988 to 1990 or so that used this name, headed by Scott Randell and Charles Simonyi, that was canceled. So any history of the name that doesn't come from a member of the original C# team is not authoritative. Charles can be reached at intentsoft.com for verification (I suggest someone write him, and if he responds, placing the response on a web site where it can be cited). Having said that, it was recognized within Microsoft at the time that the octothorp was made of four plus signs. Since the name came into use at Microsoft before the establishment of Unicode, there wasn't the distinction between the sharp symbol and the octothorp in the characters available at the time. 209.221.185.146 11:24, 27 September 2007 (UTC)

Coding style

The recent edits have, among other things, changed the coding style to Java-like "braces on same line as statement", with edit description of "consistent with the most common style". I would argue that it is by no means the most common style for C# - Microsoft's coding style is doubtlessly the most prevalent, being described in MSDN, used in all their examples and demo programs, and enforced by default in Visual Studio - and it does put braces on separate lines. So I think that's what we should do here as well. -- int19h 08:18, 23 April 2007 (UTC)

I'm not sure how you got the impression it is Microsoft's or MSDN's style to use "braces on separate lines". AFAIK nearly all of their examples, including those in the Visual Studio documentation and online (random example), use the more compact style. About the Visual Studio setting, I'm not sure about that, and can't really confirm it without a reinstall. But in the end that's just a setting. For small code samples like this though, the "brace on same line" style imho prevents the examples from cluttering the article. (The readability of the examples themselves is entirely subjective.) – Chip Zero 09:20, 23 April 2007 (UTC)
It looks like they're changing it then. In my copy of MSDN that came with VS2005, I cannot find a single example written in such style. I just tried looking for "examples (C#)" in the Index, and then going through them one by one - same thing, they all show a very consistent style, with braces as in ANSI C style, separate lines. Here is the "official" collection of Microsoft samples for C# - how about looking there for guidelines on the style? I'll do it myself as well, as soon as I have a little bit more time. -- int19h 17:18, 23 April 2007 (UTC)
Looks like they aren't as consistent as I thought then; never really noticed they also have examples in "brace on separate line" style. All the examples in the main API help section – basically any non-trivial method has one - seem to be "brace on same line". – Chip Zero 19:38, 23 April 2007 (UTC)

Possibility that the "#" symbol is related to C++++

The following discussion took place at User talk:Crazycomputers and has been copied here so it may continue with participation from more editors. --Chris (talk) 06:10, 13 May 2007 (UTC)

Hello,

C++++ may be speculation. However I think it may be speculation that the musical note statement is complete and factual as to the original idea of the name.

Apparently, the email is from a customer service agent. An email from a lead architect or executive would be a more authoritative source. Also, I question whether Microsoft Corporation is a neutral source in this case. Even if the original idea was C++++, the company representatives may state otherwise based on marketing or legal reasons. Instructions to present it this way may come from top executives in the company. (It is wrong to be dishonest but do we doubt that there has been dishonesty in the business world?)

I think the increment of ++ is more logical than the analogy of the sharp symbol as half step up (in tone). Is it a coincidence that the sharp symbol is also four plus signs combined?

You say that I have no valid citation (based on Wiki rules.) That is one reason.

I have three proposed reasons why C++++ should carry as much weight if not more than the muscial note statement:
1. The source is not reliable enough - customer service.
2. It is not neutral. It is a billion dollar corporation with marketing and legal motives.
3. Logic: C++++ is more logical from the C language perspective.

By the way, I think the C# language itself is excellent. I already use it and plan to continue to use it.

Coder1024 21:09, 6 May 2007 (UTC)

  1. Customer service from the organization that invented the language.
  2. They are also the definitive source.
  3. No it isn't, int c = 0; c++++; will not compile. It makes no more sense than using musical notation.
--Chris (talk) 21:10, 6 May 2007 (UTC)



It is still the customer service department. I don't think this is finalizing research if you want to be official about sources.

Yes, they invented the language. That is my point. They are not neutral. (Sadly) A billion dollar company may avoid disclosure based on business interests.

> ... c++++; will not compile.
First of all, there is no rule that the concept has to compile.

Secondly. Consider this:
c = 0;
c++;
c++;

That does compile and notice that it is a sqaure formation that compiles! Just like the "#" symbol!

Coder1024 21:30, 6 May 2007 (UTC)

This still seems to me more like somebody's pet theory that got propagated across the web than anything reliable. --Chris (talk) 20:55, 10 May 2007 (UTC)


Are you relying on Microsoft Corporation as a neutral (billion dollar business) and reliable (customer service) source to decide that you have the authority to delete others' posts? It may very well be that the original idea for the name is the four plus signs. Sources must be neutral and reliable.

Do you think that Microsft Corporation would state the actual history of the name rather than a marketing explanation if there was a business interest? Do you think there is a business interest in disconnecting C# from C++? I think there very well may be. If C# is based on C++++ (or similar form) then people who use C++ may observe that C# is not really the next step in C++. Since C++0x is actually the next step in C++, C++ users may wait for that rather than switch to C# if C# is trying to be C++++. C++0x would mean that C# is not the real C++++ in the eyes of C++ users. Don't you think Microsoft Corporation would realize that? Many people are already debating whether to use C++ or C# more heavily. So any ambiguity or doubts about C# could cause C++ users to stay with C++.

Also, most Linux developers use C++. Would it not be a business interest of Microsoft Corporation to have C++ users using C# so they will be less skilled in C++ which is the main language used for Linux development?

Therefore I think to claim the source as neutral is just as shaky if not shakier than what you call "somebody's pet theory". Wikipedia is a public arena that is to be neutral and free from politics including the ability of billion dollar corporations to influence what is recorded.

If a standard is going to be held to, then it should be held to consistently. Therefore the musical note explanation should be deleted. Since the musical note explanation may be a product marketing fallacy or emphasis, it cannot be considered a solid source.

Coder1024 00:22, 13 May 2007 (UTC)

Technically, according to your points, we have no "reliable" sources on the language name, so how about we just delete the whole section?
On the first point, of course Microsoft could influence the name of the language, in the same way that the language developers could. They could have come up with the name for whatever reason, but used any explanation in a published work on the subject. So they are incorrect, but it would be a reliable source by most people's standards. So this supposed reliable source that doesn't exist is just as fallible as the ones presented now.
On the Linux front, you might want to actually hang out with Linux developers before making such a sweeping judgment. Very few of the developers I talk to use C++, with the exception of the KDE crowd. Most use C, Perl, or even C# (with Mono). So I'd suggest doing your research on that one.
No offense, but the question of a billion dollar company influencing what is recorded seems like BS to me. They invented the language. Why are we citing web tutorials that speculate about the language name without even citing their own source when we have a letter from the company that invented and named the language? What would you consider a reliable source to me? This seems pretty much like as close to a primary source as you can get.
Also as an afterthought, I'd appreciate it if you'd make one edit to my talk page instead of constantly refactoring your messages. Use the preview button. I get a notice whenever you edit this page, but I don't feel like I can reply because the notices keep popping up, so I have to wait until they've stopped for a half hour before it makes any sense to respond. --Chris (talk) 01:37, 13 May 2007 (UTC)


> On the Linux front...Very few of the developers I talk to use C++.
Microsoft Corporation's hold on the market is largely due to OS capabilities and hardware support (granted app compatibility is key also). The Linux OS itself and drivers are mainly written in C/C++. Therefore, if people focus on C++ this increases the pool of people whose talents are helpful to Linux. Do you doubt that Microsoft Corporation wants to steer people to C# for this reason? I don't.

Reliability is dependent upon neutrality. If a source is not neutral then reliability loses its bearing. Therefore Microsoft can neither be considered neutral nor reliable.

Microsoft "invented" the language. "Invented" in quotes becuase they hired a Delphi developer who also drew from C++ and Java. Don't you think the CLR garbage collection ("managed") is based on Java? The GC idea for Java itself probably originated from Cedar (based on Mesa). Bill Joy was interested in Mesa. Mesa was invented by Xerox. Speaking of Xerox, isn't that where much of the window GUI ideas came from? Microsoft is a business. A responsible Wiki article separates corporate marketing (and potential fallacies) from factual information.

The article should at least qualify that the company "represents" the name to be based on a musical note but that this does not mean that the factual origin of the name is not some other source (e.g. developer's use of four '+'s). Because, using Microsoft Corporation as a source, that's all you can really say that is known for sure - that this is how the company (customer service representative) "represents" the basis of the name. One cannot claim that a corporate business representative is a source for historical factual information. Look at the history of the term "windows". If you look up the history of the graphical user interface right in Wikipedia, you will find that Xerox called it "WIMP" (windows, icons, menus, and pointers). The wiki section on Microsoft Windows (R) has no reference to that and it does not discuss the history of the name. Consider why the Microsoft Windows (R) wiki article does not discuss where the idea for the OS name came from! The term windows was in use long before the Microsoft usage. Even "Microsoft DirectX (R)" probably means direct "X windows"! Look at "basic", "office", "word", "net". So many of Microsoft's products are named after commonly used terms. Therefore it is reasonable to think that C to C++ to double "++" was the original idea for the name. It seems highly questionable that it is based on musical notes. I think the article may be posting corporate marketing as factual historical information and misleading people based on a non-neutral source as what the facts really are. So yes, it should be clarified to present a realistic un-biased picture to the reader.

Coder1024 03:37, 13 May 2007 (UTC)

I had written a reply, but my browser decided it would rather crash before I saved it. Of course this was in the middle of an edit conflict with you, so I must again ask that you edit this page once when you are posting a message. There is a nifty "Show preview" button that you can use, as well as edit messages in your userspace and then paste them here. I'm getting tired of having to reload the edit page to reply to you. I'm not trying to be mean, but this is getting very irritating.
C is the main language used to develop the Linux kernel and most services and utilities. C++ is used primarily by KDE folk. I haven't seen it used much elsewhere, except perhaps with games. There is also a large volume of desktop software for Linux being written in C#. This page lists quite a few, but is not complete. So this idea that Microsoft is trying to get people to switch to C# for its own benefit is invalid. Many of these applications won't even run on Windows. If they wanted to keep the language for Windows they would not have standardized either C# or the CLR.
If you want to talk about using neutral sources then I'd suggest removing every citation of CNN from Wikipedia. Of course, you really shouldn't, as this would violate WP:POINT, but you see where I'm going. Sources are inherently biased, CNN being a more extreme example, but I challenge you to find me one truly unbiased source.
I'm not sure what point you're trying to make by marking C#'s similarities to Java. (Which, in fact, are totally unrelated to C#, but are properties of the Common Language Runtime.) Yes, Microsoft copied some things from Java. What does this have to do with the name of the language?
It should also be noted that the EMCA spec defines the pronunciation of the language name as "C Sharp," and while this is not definitive proof that "sharp" refers to the musical note, it does agree with Microsoft's position, so it may be considered circumstantial evidence. In the current article text it says "Microsoft clarifies the language name as follows:" before it makes a reference to the email. So the article does qualify that the company is saying this. --Chris (talk) 04:18, 13 May 2007 (UTC)

>Yes, Microsoft copied some things from Java. What does this have to do with the name of the language?
You said they "invented" C# as a basis for their reliability as a source. I am showing that "invented" does not mean that the company is necessarily giving factual information about the name. I gave many other examples of product names such as the OS that are not names they originated even though they developed the technology. I also pointed out that the wiki article on the OS does not even discuss the history of the name. So I have given many examples showing that Microsoft Corporation is not a neutral or reliable source regarding names since the majority of the names of their key products are based on previous terms (even though they invented/developed the technology). Therefore the evidence is against C# as being based on musical notes even if that is what the company represents.

> If they wanted to keep the language for Windows they would not have standardized either C# or the CLR.
They are a business and I'm sure they spend much time strategizing. It's "standard" and they need to be ready in case Linux does take off, so that they can use their framework on it. However they control the "standard". Also Dr. Bjarne Stroustrup, the inventor of C++, sees that Microsoft ties languages to the OS: Dr. Bjarne Stroustrup on the subject

> ...I'd suggest removing every citation of CNN from Wikipedia
It is you who are deleting posts in this case - not me :-) You are being lax about neutrality and I am being lax about sources. If one is to interpret the rules then one must be consistent.

> So the article does qualify that the company is saying this.
The purpose of the wiki is to present factual historical information - not to present potential marketing fallacies and justify it because the source is given. That's like saying drinking 15 cans of cola a day is healthy and quoting a soda company as the source. It is clear that the source is not neutral so there is nothing hidden there, true. However, presenting the information itself is useless since the claim that drinking 15 cans of cola a day is healthy is not factual information.

If the article did not even discuss the origin of the name this would make it consistent with the article about the OS that keeps a clear focus on the OS as a product. There is a separate article for the history of GUI. There could be a separate article for the history of C-like language names.

Coder1024 05:42, 13 May 2007 (UTC)

You seem to have this guilty-until-proven-innocent notion on Microsoft's reliability as to the origin of the names of their products. You have cited numerous examples of where various names have come from, but I don't see any citations that show Microsoft disagreeing with them. The evidence is not "against" C# being based in music according to your arguments, there just isn't any evidence of it... at least I think that's what you're trying to say.
On the closeness of C# to Windows, the link you've provided does no better than the web tutorial you are using to justify the C++++ naming theory. "X is true" is not justification, it's someone's unreliable opinion. He has not demonstrated that C# as a language is tied to the Windows platform, and in fact it is not. The framework libraries commonly used with C# are, however, but this says nothing about the language itself.
On laxness of reliability, I am being consistent. I haven't argued against CNN, just said that no source is completely neutral. So again, I don't see your point there. You will also note that I have not deleted your "post" since this discussion began, because it would be premature to do so. I am merely arguing that you get a better source for your claim, if one exists. IMHO, Microsoft is far more reliable than some random web tutorial. You may disagree with that, but that's the position I'm arguing from.
Yes, the purpose of Wikipedia is to present factual information. I would hardly consider speculation in a web tutorial factual information. You may consider using Microsoft as a source to be the same. So we are simply in disagreement about the other's source.
The article discusses the origin of the name because it is apparently of interest, seeing as the article was warred over regarding it well before either of us started editing it. There are strong sentiments on both sides, and while I would not object to a trimming of the section, we should at least keep the parts that are verifiable: that the octothorpe (#) is used in the typed form of the name, and not the musical sharp symbol.
(But if the musical sharp symbol was used in literature before the standard was widely known, is that not evidence of the name's origin? Why would they put four +'s together and then use the sharp symbol, instead of just using "#"? The sharp symbol does not look like four +'s merged, but it could represent two L's, one rotated. In that light, the origin in the musical notation symbol seems to make a lot more sense to me. Just a thought.)
If you do not object to this idea I might fork the article and work towards a solution that uses none of these sources. --Chris (talk) 06:07, 13 May 2007 (UTC)

> Why would they put four +'s together and then use
> the sharp symbol, instead of just using "#"?
If the original idea was four +'s together, they would have a hatch-like symbol. Then they would have to start thinking of the verbal name. "C-sharp" is acceptable whereas "C-pound" or "C-octothorpe" are not. So it could go from double '++' to sharp. When asked, the company can claim the _orignal_ idea was a musical note while all the while they have taken away C++'s chance to use another '++' in the next name. Notice how Microsoft also talks about C-w "C-omega". However, they are not changing the name of C# so why do we hear little mentions about C-w? Could it be they are trying to subtly say "see we use lots of terms like C-<xyz>" I'm sure you don't underestimate the cleverness of a business like Microsoft Corporation as masters of marketing psychology. They like to show their Channel-9 videos as informal "techie" groups discussing products. However, do not doubt that what you see is desgined to convey a message and is based on corporate software and marketing strategy.

> You will also note that I have not deleted your "post"
> since this discussion began...
OK thanks - it was deleted again and I thought it was you. That's why I re-opened the discussion. I apologize for presuming you deleted it again. However the discussion may prove beneficial anyway.

> I would hardly consider speculation in a web tutorial factual information.
I agree 100% and I think we're in agreement that a company with mission critical marketing motives is far from neutral.

> :The article discusses the origin of the name because it is apparently of interest...
Exactly, and I find the four +'s to be a very interesting likelihood. So whoever keeps deleting it should stop.

> There are strong sentiments on both sides,
As for me, I don't really care that much - it's more just the principle of someone (whoever it is now) deleting a post about what may very well be the actual origin of the name in favor of a potential marketing fallacy. Also, we're only talking about the name origin which is a less serious topic anyway (unless you are a business with marketing interests).

By the way Chris, I'm not opposed to Microsoft per se. I think the Microsoft Windows (R) operating systems are excellent and I think C# and the IDE are well done and probably offer the best development experience around. Shame on companies like IBM and Sun who still cannot find a way to compete. There's no excuse :-) At the same time I am realistic about where some business moguls put their priorities when it comes to marketing vs. historical facts. :-)

Coder1024 07:19, 13 May 2007 (UTC)

The only question here is whether we should retain the information derived from the customer service e-mail. The question is whether that source is reliable or authoritative enough for these facts. The quadruple plus thing is just an urban legend and even if it were some ridiculous corporate secret (which as an insider I've never heard anything about) it would still be unverifiable information that we can't report for lack of a source. Dcoetzee 11:39, 14 May 2007 (UTC)

Dr. Bjarne Stroustrup is the inventor of C++ and works with Herb Sutter who is the chief C++ architect at Microsoft. I have emails from Dr. Stroustrup and these are quotes:

[Dr. Stroustrup] (dots added instead of spaces)
Yes. I know that's historically correct. ++
.......................................................++ is
the origin of #

[Me] I stated this on the Wikipedia and the idea that the # originated with four '+'s is deleted but the Microsoft Corporation statement from a customer service representative that it is based on musical notes stands.

[Dr. Stroustrup]
I was there and he wasn't :-)

Coder1024 18:07, 14 May 2007 (UTC)

If that's the case then get him to publish the fact on a public website where it can be cited. Personal communications are not verifiable. Dcoetzee 19:37, 14 May 2007 (UTC)
The citation we are using for the musical note origin of the # symbol was a personal communication between a Wikipedian and Microsoft customer service. --Chris (talk) 20:55, 14 May 2007 (UTC)
In fact, the content of the email we are using as a reference does not actually state that the origin of the name is in the musical notation symbol, but rather that the # symbol represents it. It specifically does not clarify where the sharp symbol came from. --Chris (talk) 23:11, 14 May 2007 (UTC)

The quotes from Dr. Stroustrup and from Microsoft (both from emails) are on a similar par as sources for their respective information i.e. origin of symbol shape and Microsoft product branding.

Coder1024 00:04, 15 May 2007 (UTC)

Four Plus Signs

Dr. Bjarne Stroustrup is the inventor of C++ and he also collaborates with Herb Sutter who is the Chief Architect for C++/CLI at Microsoft. This is a quote from an email that Dr. Stroustrup sent to me regarding the origin of the sharp symbol. This is confirmation that the sharp symbol is based on four '+' symbols.

[Dr. Stroustrup]

Yes. I know that's historically correct. ++
                                         ++ is
the origin of #


Coder1024 01:48, 17 May 2007 (UTC)

At the risk of being obtuse, I suspect this still comes dangerously close to violating WP:NOR unless a reliable external citation can be provided, proving that this e-mail a) does exist and b) is verifiably sent by Stroustrup. As it is, a Google search didn't turn up many results (removing quotes a) reduces the accuracy and b) adds so many results it's virtually impossible to check). A quick search for his name in connection turns up only an interview that I'm already aware of, from about 4 years ago. What source did you use to find the e-mail? Angus Lepper 15:20, 17 May 2007 (UTC)
... and this seems to be exactly the view expressed above when you previously aired this motion. However, I do take your point that your assertion that this e-mail is true is about equal with the Microsoft representative e-mail -- although the Microsoft one is probably more easily verified. Angus Lepper 15:24, 17 May 2007 (UTC), amended by Angus Lepper 15:34, 17 May 2007 (UTC)

Dr. Stroustrup has a web site here: Dr. Bjarne Stroustrup . His email can be obtained starting from there. He indicates that he will generally respond to questions (as he has responded to mine). Dr. Stroustrup regarding email

Coder1024 16:54, 17 May 2007 (UTC)

Since he has a website, it would be nice if Dr. Stroustrup would publish his response somewhere on it (maybe in the FAQ section?) so that it can be more properly cited. I'll leave it to those of you that actually know something about this topic to contact him. Otherwise I'm not sure this can stand up to WP:CITE (or ultimately WP:V).
-- trlkly 11:12, 29 July 2007 (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: [16]

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,[17] 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: [18]. 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)