Skip to content

Comment on Developing on WP7 vs Android vs iPhoneparent

Comments

I actually was just wishing c# had as terse of a null check syntax as ObjC. I love the fact that I can type

if(!object)

  [[Do something]about it]
vs

if(object == null)

  DoSomething.Aboutit
I know its a small thing, but my typenames are usually lengthy so in practice C# statements can get character heavy.

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.

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.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.