views:

474

answers:

3

The Silverlight 2 and Silverlight 3 Beta framework do not support compiled Regular Expressions i.e:

RegexOptions.Compiled

I'd be interested to hear the reasoning behind why this is the case if possible.

A: 

I just went through the new Silverlight 3.0 help files looking and they still have the same message:

The implementation of the regular expression engine in the .NET Framework for Silverlight is identical to that in the .NET Framework. The single exception is that the .NET Framework for Silverlight does not support compiled regular expressions, which are predefined regular expression patterns that are stored in stand-alone assemblies together with dedicated regular expression engines that process text using those regular expression patterns.

I suppose they may have forgotten to update the help file, but I haven't heard any work in the blogs to suggest otherwise.

Michael La Voie
Thanks, this is the same documentation paragraph linked to in my question. I have now edited the question to hopefully make things more clear.
Peter McGrattan
+1  A: 

I guess it comes down to same reason for many design decisions in Silverlight - that it was a framework feature that didn't survive cost/benefit analysis; whether the benefit of having the feature was worth the additional size of the core download.

Craig Shearer
would you mind telling me a bit more about what you say here?
Luis Armando
The bottom line is that MS wanted a small download so that end users wouldn't be put off by a big, slow download. Every feature added to the framework adds to the download size.
Craig Shearer
A: 

Since silverlight is cross platform, there is no guarantee that the application will be able to create a separate assembly either permissions wise, or capability wise on the executing machine.

Jason Coyne