Wednesday 25 November 2009

Does it work on MonoTouch? And more crazy constructors…

A double-feature ;-p The first didn’t seem to warrant a blog entry by itself, but I found if fascinating; as if interface constructors aren’t enough… when is “new T() == null” – and I’m not accepting Nullable<T> ! Ayende Rahien posts a fascinating “feature” of .NET – well worth a read. Caution – it might make you feel dirty…

But what I really came here for; MonoTouch… I had anMonoTouch box e-mail earlier from somebody asking if protobuf-net would work on MonoTouch. My answer there is simple: I have no idea! I’d love to be able to give a better answer, but even the free evaluation edition needs a Mac. protobuf-net is a voluntary and revenue-free project, and I simply can’t justify buying a Mac to investigate.

I’m pretty sure that the “Reflection.Emit” code would have to go, but that is already the case for Compact Framework etc. I honestly don’t know about the rest of the reflection and/or optimisations. I might be able to offer guidance if anybody wants to try to get it working on MonoTouch (unless you want to lend me your Mac, iPhone and MonoTouch license for a while…).