Programming language: F # 5.0 supports interactive programming with .NET 5

Source: Heise.de added 12th Nov 2020

  • programming-language:-f-#-50-supports-interactive-programming-with.net-5

The .NET team has released the new major version of the functional programming language F #: Microsoft ships F # 5.0 together with .NET 5.0, which was released this week. The focus of the current release is on the interactive development of code and revised analytical functions. The basic functions are designed for the new .NET version 5.0, which succeeds the .NET Framework, .NET Core and Mono variants and aims to standardize the three previously separate Microsoft development strands.

Interactive programming with Jupyter Notebooks and nteract F # 5.0 is the new standard version of the language for the Visual Studio development environment ( VS) and the .NET SDK. Anyone who compiles a new or existing project with one of the two tools automatically uses version 5.0 from now on. According to the announcement in the .NET blog, Jupyter Notebooks and nteract also support the release, making interactive projects with F # possible. The new main version apparently masters the # r “nuget: …” – syntax for referencing packages. Package references then support native dependencies such as the machine-learning framework ML.NET, with them F # developers can load packages in Jupyter notebooks and in the notebooks from VS Code that are still in the preview stage.

A major innovation in F # 5.0 is string interpolation, which is designed to be similar to interpolated strings in C # and JavaScript: Developers can now apparently code into the “spaces” of a string Enter in the string literal. According to the F # team’s blog entry, typed interpolations are also possible, with which one can force the interpolated context to correspond to a certain type. The format specifications correspond to the function sprintf .

Disclose type declarations To protect your own logs against later changes in the source code when logging, F # developers can now use the new feature nameof , with which an assigned symbol can be resolved consistently. For example, month names can be anchored – the call of a 13. In this case, names would produce an error message, since the name pool only contains twelve months. According to the editors, practically anything in F # can be used as “names”, including type parameters.

F # 5.0 enables the disclosure of type declarations – the principle is roughly equivalent to opening a static class in C #. With the new command open developers should now be able to reveal the static content of any type. Entries defined by F # can also be “opened” with it. This option is useful if, for example, you want to access the derivatives of a union without having to open the entire higher-level module.

betterCode () presents: .NET 5.0 – The online event on December 3rd 2020 You can learn that: From .NET Framework via .NET Core to .NET 5.0: What does this mean for the migration, and how big is the effort ? What’s new in .NET 5.0? New Features: Get to know ASP.NET Core 5.0 and Blazor 5.0 The most important language innovations in C # 9 Mobile development with .NET 5 OR mapping with Entity Framework Core 5.0 WinUI 3 as an alternative to WPF and UWP Outlook for .NET 6.0 Further innovations concern the performance of runtime and compiler, the slicing of data types when working analytically on data sets and computative expressions are used in F # 5 for modeling context-related calculations, the so-called “monadic arithmetic operations” of functional programming. A number of other features such as reverse indexes are in the preview stage in the starting blocks and will reach a stable state in future releases. For the next version, the F # team is planning to work on the open source infrastructure. It plans to improve some of the core tools. The last F # version 4.7 was released in September 2019 parallel to the then .NET Core 3.0 and had required the .NET Standard 2.0. Since F # 4.7, the effective language version can be coordinated with the compiler.

Functional first and multi-paradigm language 2017 Mads Torgersen , a program manager in the .NET team at Microsoft and lead designer for C #, commented on the strategy of the company’s own .NET languages: At that time there was a departure from the “co-evolution strategy”, since then the languages ​​Visual Basic, C # and F # more individual lines of development. F # is the functional counterpart to C # and is one of the multi-paradigm languages: F # is a statically typed functional-first language with features and idioms for functional, object-oriented and imperative programming. Examples of functional languages ​​are Elm, Elixir and Clojure, classically object-oriented (and mostly “general purpose”) languages ​​such as Java, PHP and C #. However, the strict boundaries are blurring, functional concepts are also finding their way into this area.

When changing strategy three years ago, Microsoft announced that it wanted to make F # the “best functional language”. The type system is particularly powerful because it can infer the type of an expression or value without specifying type parameters. In practice this means that it is often not necessary to specify the types when using the language. Values ​​and functions can be linked to names for identification and assigned to them. In contrast to other languages, these variables are then unchangeable. Only at first glance does F # appear like a special language for mathematical algorithms – on closer inspection it opens up a broader range of applications. It was already noticeable before 2017 that F #, although less active developers than C # and Visual Basic, had strong support in the open source community for this.

Further information More information about the release of F # 5.0 can be found in the detailed announcement in. NET blog from Microsoft. The F # team lists numerous code samples and provides instructions on how to install them in different environments. F # 5.0 is included in the new .NET 5.0 release and can be used under Windows with Visual Studio from version 16. 8, in addition to the classic purchase via the current .NET SDK, installation is also possible in Jupyter notebooks and VS Code notebooks (preview).

(sih)

Read the full article at Heise.de

brands: Microsoft  Symbol  
media: Heise.de  
keywords: Mobile  Open Source  Windows  

Related posts


Notice: Undefined variable: all_related in /var/www/vhosts/rondea.com/httpdocs/wp-content/themes/rondea-2-0/single-article.php on line 88

Notice: Undefined variable: all_related in /var/www/vhosts/rondea.com/httpdocs/wp-content/themes/rondea-2-0/single-article.php on line 88

Related Products



Notice: Undefined variable: all_related in /var/www/vhosts/rondea.com/httpdocs/wp-content/themes/rondea-2-0/single-article.php on line 91

Warning: Invalid argument supplied for foreach() in /var/www/vhosts/rondea.com/httpdocs/wp-content/themes/rondea-2-0/single-article.php on line 91