----- Original Message -----
From: "James Sieben (EUS)"
Sent: Wednesday, June 28, 2000 11:46
Subject: RE: C# (was: aspectJ (was Re: [PATCH] build events))
>
> The unsafe code blocks are also questionable. I guess they are trying to
> position this as being THE language for Windows development (which isn't
> that bad of an idea really, since C++ on Win32 is heinous.) But it seems
> like you could do the same thing, but cleaner, with something like JNI for
> C#. What's more, all the objects automatically become COM objects (that is
> kind of neat) so why not just use those for "unsafe" code, coded in C to
get
> full speed out of the machine in the first place?


some reasons spring to mind
a) to replace C++ on win32 with C# on win32
b) to stop anyone writing portable code.

> Similarly, they added something called Atributes that seems to let you
> specify your own programmable modifiers? But it isnt documented well, and
> thus I couldn't make heads or tails of it. I did gather that it seems to
be
> syntactic sugar for COM interfaces, but its quite nebulous. I dont know
what
> to make of it. It does look very exoressive though, but at what price?

It is probably to specify all those things that the COM IDL expects so that
you don't need an IDL file anymore. Imagine RMI with extra hooks for VB
datatype compatibility...

The example
[Help("http://www.mycompany.com/…/Class1.htm";)]
public class Class1
{

certainly resembles the start of an IDL interface in that delightful syntax
 [
  object,
  uuid(79AE1922-83D2-11D3-B373-0060B0C37229),
  dual,
  helpstring("INavigator Interface"),
  pointer_default(unique)
 ]
 interface INavigator : IDispatch
 {

>
> Finally, why do they make a big deal out of versioning? Without saying it,
> they seemed to directly confront Java's way of dealing with changing
classes
> and such. I don't understand what the problem is with the way Java works
> now. I know that in all my years of Java and C++ coding, I've never run
into
> a problem where I derived from a class, wrote a method, and then the next
> version of the base class introduced a similarly named method. It just
> doesn't seem to be that big of a deal to me. Why the language level
features
> to do this?

I've encountered problems where
-VB introduced new reserved worlds that matched variables I'd encountered
-MFC updates kept the same methods but broke behaviour
-Win32 SDK updates changed the size of some structs so that the code would
crash when run against the classic MFC libraries

All of these problems have three things in common. Firstly, C# version does
nothing to prevent them. Secondly, the changes all orginated in Microsoft.
Thirdly, it was my code that broke and me that had to to fix things. Do I
think C# versions will prevent this? Nope.

> All in all, theres some useful bits in there, but most of that is nothing
> new. I really really like the syntax for accessors/mutators. It's such a
> pain to write all those methods by hand in Java (though mature IDEs do
help
> with that these days.)

That is nice; it lets you start off with raw access and then write the
get/set functions later if you need to. Also it may i18n-ize better. What is
French for get and set anyway?

> But other than that, it just doesn't seem that big of
> a deal. Theres lots of cruft still left in it....trying to win over the
> hordes of C/C++ people by leaving the bad features in is just a mistake I
> think.


It's wierd. Classic C++ code wont be much easier to port to C# than to
Java -no multi-inheritance, templates, or statements like if(!x) when is an
int. So why leave the other cruft in? Maybe it was to make it easier to port
legacy tat within MS itself.

It will not so much be linguistic niceties (hey, VB outsells all the rest)
as execution who determines the victor. Sun are at risk by trying to become
the next Microsoft -ducking out of ECMA, wierd JCP process. MS can make the
language a standard and use SOAP as the 'open' interchange format and act
like Sun are the closed, proprietary world. The risk that MS have to
execution is that they are forced to use their own tools, which can impact
time to market somewhat :-)  Nmake anyone?

    -Steve





Reply via email to