[Mono-list] Question about C#

Miguel de Icaza miguel@ximian.com
11 Sep 2002 14:38:11 -0400


Hello,

 
> This whole issue arises because c# treats objects as references to
> objects instead as the real ones (not that I find this wrong). I think
> that if you use a language that tries to be so simple as c# is, and
> that tries to "help" the programmer by simplifying syntax, etc, then
> it is suspicious not being able to write a simple object assignment 
> (without having both variables referencing the same object. Note that
> by simle I mean using the = operator). This could be just a decision
> made by the folks who thought about the language (and then I could not
> make anything about it, of course), so I dont want to make a big
> discussion about this here (because it is really a C# topic and not
> mono specific).

The design of C# is very much aimed to simplicity and ease of
understanding.  If you see a chunk of code like this:

	a = b

You would immediately know that you are making a reference copy, and
there is no second guess on whether some objects would do shallow or
deep copies.  Deep copies have to be explicitly performed (as discussed
previously on this thread).

This is one of the decisions that make C# very easy to understand to
newcomers.  But this is highly subjective.

Miguel.