I love Ayende (and OSS)

 From one of Ayende‘s many OSS projects.

    /// This class actually already exists in the System.Core assembly…as an internal class.

    /// I can only speculate as to why it is internal, but it is obviously much too dangerous

    /// for anyone outside of Microsoft to be using…

And dear MS BCL team, since so many people are already using Reflector to go get the ExpressionVisitor code, would you just make this public?  ‘K, thx.

About Jeremy Miller

Jeremy is the Chief Software Architect at Dovetail Software, the coolest ISV in Austin. Jeremy began his IT career writing "Shadow IT" applications to automate his engineering documentation, then wandered into software development because it looked like more fun. Jeremy is the author of the open source StructureMap tool for Dependency Injection with .Net, StoryTeller for supercharged acceptance testing in .Net, and one of the principal developers behind FubuMVC. Jeremy's thoughts on all things software can be found at The Shade Tree Developer at http://codebetter.com/jeremymiller.
This entry was posted in Uncategorized. Bookmark the permalink. Follow any comments here with the RSS feed for this post.
  • Seth

    @Jeremy,

    Just because you haven’t worked with them doesn’t mean they’re not out there.

  • http://www.JeffHandley.com Jeff Handley

    Jeremy,

    But if everything is public and virtual, then how would things be hidden into obscurity?

    http://blog.jeffhandley.com/archive/2008/12/09/why-public-virtual-ubiquity-would-fail.aspx

    -Jeff

  • http://codebetter.com/blogs/jeremy.miller Jeremy D. Miller

    @Seth,

    I think that’s a ridiculous statement. A 501 developer isn’t going to randomly pick up obscure classes inside the BCL and try to use them on everyday work. A 501 developer won’t be looking for this class. A 501 developer isn’t ambitious enough to get burned by this.

  • Seth

    I’m glad it is internal. I can think of large number of developers I have been or currently am affiliated with that could seriously screw something up if they knew about code like this. They already screw stuff up left and right because they don’t know how to use reflection properly.

    Welcome to corporate IT departments across the nation and 9 to 5 place holders for org-charts.

  • http://www.elegantcode.com Jarod

    You can also get the ExpressionVisitor in EFExtensions… the Materializer in there is pretty cool

  • http://codebetter.com/blogs/jeremy.miller Jeremy D. Miller

    @Bryan,

    I hope it works, ’cause I’m using it. Thanks for the tip

  • Bryan Watts

    Matt Warren acknowledged that ExpressionVisitor should be public, but was not properly tested for release as production code.

    He has recently released the IQToolkit, which includes this class and many others, on Codeplex:

    http://blogs.msdn.com/mattwar/archive/2008/11/17/building-a-linq-iqueryable-provider-part-xii.aspx

  • http://codingly.com Romain Verdier

    Actually, the code is available on the MSDN, you don’t even need to disassemble System.Core:

    http://msdn.microsoft.com/en-us/library/bb882521.aspx

    But yes, this class definitively deserves to be exposed as a public type.