Darren New wrote:
> Christopher Smith wrote:
>> 2) While both are ostensibly object oriented, they have non-object,
>> native types designed to align well with C.
>
> No, all C#'s types are OO.  I think the CLR might do non-object types,
> but integers are a class in C. (Well, a struct, which means a
> value-type class.)
Well, actually they are called "Simple Types" and they have a number of
special properties that user defined types don't and cannot have. They
did improve the autoboxing, operator overloading, and various other
syntactic sugars so that these types can be null and in many ways appear
to be like other structs, but you still have that whole weird const vs.
static readonly thing, odd things with type promotion, compile time
evaluation, certain reserved operators, etc.  Granted though, C# 2.0 in
particular did a lot of things to make "Simple Types" much more
indistinguishable from user defined Value Types, while Java has no
notion of a user defined Value Type.

--Chris

-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to