Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any good reason why the #region and #endregion does not work in F#

Tags:

f#

region

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#?

like image 690
Moonlight Avatar asked Jul 25 '09 03:07

Moonlight


People also ask

Is it right to say reason why?

Speaking of which, is it correct to say, “The reason why”? It is correct to say “the reason why.” “Why” is the relative adverb that connects the noun “reason” to an adjectival clause that provides the necessary explanation or reason.

Is it for good reason or for a good reason?

It's a slight difference in connotation. "A good reason" implies "a single good reason," it implies that there is or is not a compelling reason so there's the sense of a particular reason. "For good reason" implies that reason is a bulk quantity, like sugar. There's some measure of reason.

What are the good reason?

“Good reason” is often defined in a double trigger vesting provision that accelerates an employee's vesting if the company is acquired and the acquiring company does something that gives the employee “good reason” to leave and to receive the accelerated vesting of unvested shares.

How do you use good and reason in a sentence?

Because something has already been proven to be true or justified. Yes, I'm suspicious, but for good reason—I've already caught her twice.


2 Answers

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.

like image 169
Kredns Avatar answered Sep 22 '22 11:09

Kredns


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.

like image 36
Dustin Campbell Avatar answered Sep 20 '22 11:09

Dustin Campbell