Thursday, 4 February 2010

I want union of types in c#

I would really like something that defines a field or argument as a union of types in c#. I'm not sure about the best syntax but something like this would be nice:
BindCollection(<ICollection<T> , INotifyCollectionChanged> collection);

Currently I'm achieving some of this functionality using naked type constraints. Like this:
BindCollection<U>(U collection) where U : ICollection<T> , INotifyCollectionChanged
This has some limitations, like you cant use it in a constructor. The sweet thing about this is you don't have to do casting, you get some checking from your compiler and you'll get code-completion for the union of types

Tuesday, 2 February 2010

Flah on iPad

I love the fact that the iPad doesn't have support for flash! I believe removing flash support is a big win for an open standard-based web and a rather small loss for consumers. Personally I've never missed flash on my iphone, although browsing the web is kept at a minimum. Flash is closed source and proprietary and adobe should not be able to dictate which platforms are suitable for browsing the web and not (linux-x86-64, linux-ppc, mac-ppc has no recent releases). Apple, by having a substantial deployment, can change the consensus around RIA to focus on standard-based solutions.

For the user its mostly a loss except for battery-time which would probably be greatly reduced if flash was available. Flash is such a battery hog that even firefox in maemo has disabled it.
If the loss is to big for you, you should look to another system that fits your needs or sse if there is an application that allows you to circumvent this.
Apple has gone to some extent to fix the lack of flash by having an iphone-app for youtube, the no1 flash site. (if you don't support youtube, you are fucked). Youtube also enabled html5-support at youtube.com/html5. Limitations of html5 on youtube is lack of fullscreen and only H.264 and not theora (which is license-free) video codec.

Being in the same shoes as Apple I would have done the same. Imagine you have source-code for the entire stack of iPhone, iPad, iPod, except one known trouble-maker and doing support for 40.000.000 customers. Imagine if there is an exploit and you can't fix it yourselves, you'll be owned by Adobe.

Comments are welcome!

Monday, 1 February 2010

Moved blog

I ended up upgrading my blog-engines more frequently than posting blogs. I'm lazy so I switched to blogger.com. Lets se how this works out :)