Why is note notation for yield deprecated?

I am reading via wikibook in F #. At the bottom of the section , under "Explaining Lists" , it is explained that the arrow operator can be used instead of output / lesson! keywords. But he notes that this is deprecated. I was wondering why?

+2


source to share


2 answers


As far as I know, it is not out of date as such - at least the Visual F # 2010 documentation on MSDN still uses it. The disadvantage is a different syntax, which included ->

and ->>

in places other than the simple expressions for

. In particular, see this post from Don Syme - quote:



>

and are ->>

now deprecated except for compact sequence expressions.

Two cuts ->

and ->>

is now out of date , with the exception of the short form of expression : seq { for x in c -> f(x) }

. In all other expressions in the sequence, use fully qualified names yield

and yield!

.

+8


source


I think that removing most of the uses -> and ->> was done for consistency with C #. Personally, I think this is a mistake.



The understanding of Haskell is very strong because they are as succinct as standard notation - F # syntax ends up making it harder to understand because something relatively complex ends up breaking into many lines.

+2


source







All Articles