image credit: Adobe Stock

Microsoft’s F# gets computation expressions enhancement

September 29, 2023

Via: InfoWorld

Microsoft has introduced a while! keyword with its open source F# language, providing a refined approach to loops in computation expressions.

This keyword, spoken as “while bang,” is intended to minimize boilerplate, boost clarity, and enhance expressiveness, Microsoft said in a blog post on September 20. With while!, specifying an asynchronous condition in loops now is feasible. Microsoft cites the elimination of a mutant variable, a reduction in total lines of code, and a decrease in overall cyclomatic complexity as a result of while!. The while! construct does not require a builder method but instead invokes .Bind in the same manner as let! does; so there is no additional work needed when authoring new computation expressions.

Read More on InfoWorld