[Mono-list] Object additional implicit operator.

d3x0r d3ck0r at gmail.com
Fri Aug 15 15:06:52 EDT 2008




Rolf Bjarne Kvinge-2 wrote:
> 
>> Sorry, I'll drop this point.
>> 
>> It would have been really really simple when the language was conceived
>> to consider that a simple test for object existance should not require
>> the
>> specification of a null constant; 
> 
> It would make things very weird, things like !((object) true)) would
> return
> true.
> 
> 

How does that expression even mean anything?
Wouldn't you get like expected operator before true ?

		{

			bool whatever = true;
16:			if( !((whatever)true)))
	 			Console.WriteLine( "true" );
else
	Console.WriteLine( false" );
		}



Program.cs(16,47): error CS1002: Expecting `;'



Rolf Bjarne Kvinge-2 wrote:
> 
>> nor should it require the extra overhead of a comparison operator.  A
> really simple check for existance.
> 
> A few more characters generally make a language more explicit and easier
> to
> understand, and it avoids weird issues like the above, which can be really
> annoying if you stumble upon them.
> 
> Rolf
> 
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> 

-- 
View this message in context: http://www.nabble.com/Object-additional-implicit-operator.-tp18992151p19004012.html
Sent from the Mono - General mailing list archive at Nabble.com.



More information about the Mono-list mailing list