> From: [EMAIL PROTECTED] on 27/06/2000 01:15
>
> Please respond to [EMAIL PROTECTED]
>
> Microsoft has released a preliminary version of the C# ("C Sharp") language
> reference. It's at:
>   http://msdn.microsoft.com/vstudio/nextgen/technology/csharpintro.asp
>
> The language reference is a .exe file but can be unpacked using 'unzip'
> under Linux. The MS Word .doc file inside can be read by StarOffice - no
> Microsoft products required :-)
>
> C# is VERY similar to Java. Here's my summary of some of its interesting
> features (as they differ from Java):
>
>   * The language is definitely targeted at static compilation and invoking
>     dynamically loaded classes must be done through a DLL mechanism --
>     there's no dynamic class loading as in Java.
>

Sound like MS want to leverage on C++ know how. The name `C#' is hardly
original isn't. I think I even heard of C--. Why haven't they chosen
a more original name?

>   * Cross-platform portability does not appear to be a goal.
>

Of course it is only for MS World!

>   * Interestingly, C# does *not* have its own runtime library - instead
>     they intend to bind everything to Win32 and COM libraries it seems
>     (or perhaps to the ".NET" runtime we have heard a bit about).
>

There is plenty of COM, OCX, OLE third party vendor out there.

>   * Memory is garbage collected, but some code segments can "fix" memory
>     so it can't be moved by the GC, allowing you to use pointers on it.
>     Such code must be tagged with the "unsafe" keyword.
>

This is would be nice to have. A `StrongReference' in Java for static
singleton paradigm builders who need a truly deranged persistent JNDI.
Well, we will see if this is bug or a actually a feature.

>   * Events are built into the language -- although this appears mainly to
>     be syntactic sugar. A class can declare fields with the keyword "event"
>     which means they represent event handlers. Using the "+=" and "-="
>     operators you can add or remove function pointers from the list of
>     event handlers associated with that class instance. It's not clear what
>     happens when an event handler is invoked.
>

I leave C++ programmers to ponder on this operator overloading idiom.

>   * Versioning is part of the language - albeit in a primitive form. If
>     a new version of a base class declares a method which conflicts with
>     an old version of a subclass's method, then when the subclass is
>     recompiled the author must explicitly state whether the method
>     overrides or hides the base method.
>
>   * It uses 'cpp' style preprocessing
>
20th century programming

>   * Multidimensional arrays are supported
>
Again, we had that in the 20th century programming

>   * Type-checking can be disabled for code blocks by labelling that block
>     with the 'unchecked' keyword
>
Why ?

>   * Operator overloading is supported
>
Again, we had that in the 20th century programming

>   * Supports Java-style exceptions with try ... catch ... finally
>
Ditto

>   * Thread synchronization is supported with the 'lock' keyword (similar
>     to Java's 'synchronized')
>

Ditto, but are threads native ( a la Window Threads ). I presume so
since C# is not portable and will assume run only Windows platforms.

>   * Supports single-inheritance and interfaces (just like Java)
>
Ok.

>   * Virtual methods are supported but you have to use the 'virtual' and
>     'override' keywords - a bit ugly. Otherwise methods are treated as
>     non-virtual. My guess is that they are trying to avoid the problem
>     that Java has with nearly everything being a virtual method, and the
>     resulting performance issues. However, a static C# compiler should be
>     able to devirtualize everything since there's no dynamic class loading.
>
Yickety Yuck!

>   * 'struct' and 'enum' are supported (they seem unnecessary since 'class'
>      and 'interface' can be used)
>
>   * Special keywords allowing direct bindings to COM are supplied
>
> Overall it's a nice language -- some of the syntax might be a bit
> superfluous but otherwise no major problems with it. The language spec
> is very preliminary and leaves out a lot of details, such as what threads
> and locks actually do, what the memory model is, etc. As we all learned
> from Java, these seemingly minor details end up being very important down
> the line...

It remains to be seen. Where would C# fit into the big three ( C, C++, Java )
is not fully certain. What is the ``X'' factor for C# ?
Obvious Java's momentum came from Internet and embeddable applets in a
Netscape Engine 2.0. It became a killer technology development tool ( not
necessarily an application) a must have for browser savvy folks. Moreover,
developers found out about Java's columns of strength: portability,
networkability, and security.

>
> Matt Welsh, [EMAIL PROTECTED]
> http://www.cs.berkeley.edu/~mdw

--

Peter Pilgrim
Welcome to the "Me Too" generation.



----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to