Welcome to MSDN Blogs Sign in | Join | Help

CLR Inside Out

The CLR team has a column in the MSDN magazine called 'CLR Inside Out' where we go in-depth into various aspects of the CLR. The magazine is published monthly, and you can find the list of 'CLR Inside Out' articles over here. If you have topics you'd like to see covered in the article, please let us know!

This month, we have an article from Jesse Kaplan on our team, on 'Best Practices for Managed and Native Code Interoperability'.

 

Melitta Andersen,

Program Manager,

CLR

Published Saturday, January 10, 2009 9:13 PM by CLRTeam

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: CLR Inside Out

Going forward, will the CLR team be looking at adding constructs to support functional languages? For instance, sum types, or some sort of structual equivalency (even just for methods on a type, to enable runtime support for member constraints)?

Also, I'm curious about performance. Are there any optimizations being done for small, short allocations as F# tends to do? (Or is that up to that team to fix.) And, will exceptions ever be viable (perf-wise) for control flow scenarios?

Sunday, January 11, 2009 1:38 PM by MichaelGG

# re: CLR Inside Out

@MichaelGG: I'm not clear on what you are asking. If you're asking about constructs to support F#, you should ask the F# team on Don's blog (http://blogs.msdn.com/dsyme/) or hubFS (http://cs.hubfs.net/). We definitely talk with the F# team but need to let them prioritize their own feature work.

If you're asking for constructs to support functional languages in general you should submit a request through Microsoft Connect (http://connect.microsoft.com/) that will be routed to the CLR team. If you have an example of something you need to support a functional language you're writing we would love to discuss it with you there.

With regards to F# performance: The CLR team has done some work to help improve F# performance. Again, talk with F# if there's something you know could help them.

As for exceptions performance, I would not recommend using exceptions for control flow. Exceptions--in my opinion--are for exceptional conditions. Because managed exception handling is built on top of Windows exception handling there is a minimum bar for exceptions performance.

There's a connect bug on this topic with a more complete answer and some good community responses. Find it here, and look for the post from Microsoft on 12/3/2008 at 3:53 PM: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=256733

Friday, February 20, 2009 5:02 PM by CLRTeam

# re: CLR Inside Out

Hello,

 I was just wondering more in general if the CLR type system was going to grow to support more than the OO type system it currently has. Right now, each language defining different types (such as a sum type) has to write their own metadata (like the F# compiler does) -- not very "common". But perhaps this is something the BCL will address with some common attributes and ways to map such types.

 So, it was just a general question if there's any new direction for the CLR on the type system side (not just F#), or if that's something left to each language to figure out.

Thanks!

Sunday, February 22, 2009 2:15 PM by MichaelGG

# re: CLR Inside Out

Hi MichaelGG,

One of the things we look at when deciding which types to pull down into the runtime is how common they are across languages.  How likely are they to be used by multiple languages, and how likely are they to show up on API boundaries?  We try to pick the ones that are most likely to prevent duplication in the framework.  

For instance, we're adding Tuples in the next version of .NET.  Consideration for the F# programming model was the main driver for that decision, but we also feel that it's a data type that will be useful to other languages.  For more details, you can check out this post on the BCL Blog: http://blogs.msdn.com/bclteam/archive/2008/11/04/what-s-new-in-the-bcl-in-net-4-0-justin-van-patten.aspx.  

Thanks,

Melitta

Monday, February 23, 2009 9:23 PM by Melitta Andersen

# re: CLR Inside Out

Just wondering. Are there any books/articles out there that are comparable in depth and detail to Don Box's "Essential .NET - Volume 1" that cover more recent versions of the CLR.

How dated is the material he covered so masterfully?

(I'm awating edition 3 of Richter's book, skipped edition 2. But the first edition - which I read - doesn't come close to Box's book in terms of depth and detail. Nor I suppose was it intended too.).

Is there or will there be another book like Box's for CLR 2, 3.5 or 4?

Saturday, January 23, 2010 5:19 PM by Bob

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker