tags:

views:

293

answers:

3

This is very useful in organizing and browsing the code. Why is it not implemented? And if it would prevent some constructs why not have something similar for F#?

+5  A: 

I agree code folding is nice and we need annotations in the code, but I'd like something more generic than region/endregion; I'd like a generic way to give information to IDE, a generic way that's not checked by the compiler (so that IDEs can implement features, without requiring a change in the compiler).

That being said, code folding is not always a good thing. As Jeff Atwood points out in his blog post about code folding and some of it's pitfalls. Also this answer has some valid points.

Lucas McCoy
A: 

I would imagine F# is not yet mature enough to have all of the features of C# and VB.NET. I'm sure that if it is around for a bit longer the non-critical features such as code folding will follow.

Jason Irwin
+1  A: 

This is a feature that the F# team would love to add, but it is more of a "nice to have" sort of feature and isn't necessary to ship for v1 of the product release. We'll see more of these types of features make their way into F# in a future version of release of Visual Studio. For Visual Studio 2010, it's been a great deal of work to get F# to product quality.

Dustin Campbell
I can certainly understand that.
Moonlight