Re:Developing on WP7 vs Android vs iPhone
by nlogn on Thursday December 30, 2010 @09:50PM
(#2054348)
This is actually really easy to do in c#:
public static bool operator true(Class c)
{
return c != null;
}
public static bool operator false(Class c)
{
return c == null;
}
To avoid redoing this for each class you can just derive from a base class that implements these.
Re:Developing on WP7 vs Android vs iPhone
by S_A_P on Thursday December 30, 2010 @11:10PM
(#2054478)
well I know that it is possible, I was thinking of trying to write a similar type function with an extension method, but I just like how its included out of the box in ObjC. Really I think for a general purpose language C# is more flexible and while leveraging .NET you have more tools available to develop rapidly.
Part of me feels that Im not "really programming" when I write managed code though. I like writing C and ObjC because I feel like Im actually flipping switches on the CPU. It is silly I know(and all in my head), but being lower level seems to excite me more.
In reality I think its all about the right tool for the job, and choice is good.
if(!object)
vsif(object == null)
I know its a small thing, but my typenames are usually lengthy so in practice C# statements can get character heavy.