• Latest
  • Trending

We’re making F# more normal as a language, says its creator

November 12, 2021

Shania Twain, 57, Seen In Very Rare Photos With Husband As She Rolls Her Own Bag At Airport

January 4, 2023

Kelly Osbourne’s Son’s Name Is Revealed By Mom Sharon As She Returns To TV After Hospitalization

January 4, 2023

Nastia Liukin’s ‘Mental Toughness’ From The Olympics ‘Snapped’ Back During ‘Special Forces’ (Exclusive)

January 4, 2023

Chris Evans Calls Jeremy Renner ‘Tough As Nails’ After Snow Plow Accident: ‘Love You Buddy’

January 4, 2023

Keke Palmer Cradles Her Baby Bump In Strapless Swimsuit On Babymoon With Darius Jackson: Photos

January 4, 2023

Jinny Ng Reveals Why She Scolds Her Husband

January 4, 2023

Lee Seung Gi Will Not Back Down from Contractual Dispute

January 4, 2023

It’s Hard Out There for Artists: Talking About Musicians & Mental Health

January 4, 2023

Prince William Is Reportedly Too ‘Nervous’ to Talk to Prince Harry: ‘They’re Done’

January 4, 2023

Jenna Ortega Debuted a Wolf Cut Bob in a Dress Wednesday Addams Would Love—See Pics

January 4, 2023

Rihanna Just Shared the First Look at Her Baby Son’s Face and He Couldn’t Be Cuter—Watch the Video

January 4, 2023

Simone Biles and Jonathan Owens’s Relationship: A Complete Timeline

January 4, 2023
Retail
Saturday, June 10, 2023
Submit/Manage Your own Posts
  • Login
  • Register
  • Tech
  • Science
  • Entertainment
  • Sport
  • Health
  • Lifestyle
  • World
  • Celebrities
  • Sports
No Result
View All Result
Live24x7.news
No Result
View All Result

We’re making F# more normal as a language, says its creator

by News Editor
November 12, 2021
in Science, Tech
0

F# designer Don Syme said this week that the new version, 6.0, aims to be “more normal as a language” in order to improve take-up.

There was a telling moment in the .NET Conf virtual event, just after the presentation of F# 6 from Syme and his colleague, principal program manager Kathleen Dollard. A developer asked: “What is the best way to do optional values in records in F#?”

Tireless .NET evangelist Scott Hanselman, with commendable honesty, acknowledged that “I know how to say the words but I don’t know what they mean,” while even Dollard was uncertain how to answer. “Just use the F# option value,” said Syme. “Then you can create a helper method to create the record where you can take optional arguments.”

‘I know how to say the words, but I don’t know what they mean’

The problem is that while those who know F# love the language, it is somewhat impenetrable to others. Several features in F# 6.0 are intended to address this. One is the indexing syntax. Until now, an array element was accessed by expr.[idx] with a dot between the expression and the index. Now, in F# 6, developers can write expr[idx] as they can in C#, Java or C.

“We made the revision for F# to be more normal as a language,” said Syme in the presentation. “That dot was losing people for no reason. If you show F# machine learning code for example, to particular kinds of audiences, where you do a lot of indexing, a lot of slicing, the first thing they see is the dot.” They say, ‘I’m not going to listen any more’.”

YOU MAY ALSO LIKE

How power-guzzling graphics cards affect the rest of your PC

Nextbase Dash 320XR dash cam review: More style than substance

Along similar lines, there is a new task keyword. Prior to version 6.0, “async programming in F# is extremely nice, it has lots of lovely properties, but it differs from .NET tasks in some crucial ways. They are ways which created a lot of dissonance between async programming and .NET libraries which were using Tasks,” said Syme.

The F# Async module includes methods like StartAsTask and AwaitTask to enable interoperability. Now in F# 6.0, “we decided to also let you do Task programming directly,” said Syme. According to the official list of new features, “the performance of task {…} is much better” than using async.

“The themes of F# 6 are the same as the themes of F# all the way through,” said Syme, these being “succinct, robust and performant.” That said, Syme added that “we have changed the way we talk about F#,” no longer as a functional language but “we let the properties of the kind of programming you can do with F#, which includes functional programming, and many other kinds of programming.”

Other new features in F# 6.0 include resolved inconsistencies in indentation-aware syntax, more support for implicit conversions, new collection functions, and support for consuming interfaces with default implementations (a C# feature).

  • Microsoft previews Visual Studio 2022 for Mac, but why bother when VS Code runs just fine on Apple hardware?
  • .NET 6 LTS and VS 2022: Major releases spoilt by continuing concern about Microsoft’s commitment to open source
  • Amid drama at .NET Foundation, Microsoft’s De Icaza reveals it was meant to be like GNOME Foundation
  • Faster .NET? Monster post by Microsoft software engineer shows serious improvements

Tooling improvements include pipeline debugging, where pipelining is the passing of the output of one function to be the input to another. Pipeline debugging lets developers set breakpoints for intermediate stages in the pipeline.

The debugger will also now show the value of shadowed variables, meaning variables whose values are not visible because a new variable with the same name has been declared later.

There is also what Dollard calls “dramatic improvements to Compiler/IDE-tooling perf/scalability.” In addition, F# 6.0 benefits from performance improvements in the .NET runtime.

F# emerged from Microsoft Research in Cambridge, starting with a post from Syme on the Caml mailing list in 2001 asking whether “there are people with some time to spare who would be keen to work with me toward a .NET version of OCaml?”

The full early history can be found here [PDF]. Does the F in F# stand for “functional”? “Sort of,” Syme told us. “F is partly for ‘System F’, a core lambda calculus – but of course that calculus was named after Function. The F# community say ‘F# is for fun’ which is a cute pun on the keyword ‘fun’ too.”

F# 1.0 appeared in 2005, and Syme made an impact in programming communities with demonstrations of how concise it was compared to most languages, in certain scenarios, for code that did the same thing. It soon won favour in the financial community because of its efficiency and because functional programming is less error-prone, avoiding potentially expensive bugs.

Barriers to wide adoption will remain, not least because F# project types in Visual Studio are limited to console, library, and web applications, compared to a full range of project types for C# or Visual Basic. There is support for .NET interactive notebooks, though, and typing dotnet fsi opens an interactive session anywhere the .NET SDK is installed.

F# is also notable for its good standing in the open-source community. The F# Foundation has a clear legal structure and the language evolves via RFCs, a well-established open process. F# also has excellent support for the cross-platform Visual Studio Code, via a set of crowdfunded tools called Ionide.

The language remains niche – although with an enthusiastic following. StackOverflow’s annual survey puts usage at just 0.97 per cent of respondents, but turn to the “most loved” section and it scores 62.44 per cent, just above C#. Boosting its usage is a challenge, though the changes in F# 6.0 show that the community would love for .NET’s best-kept secret to be better known. ®

Read More
Photo Credit:

Tags: MakingWe're
ShareTweetShare
  • Tech
  • Science
  • Entertainment
  • Sport
  • Health
  • Lifestyle
  • World
  • Celebrities
  • Sports
Email:live24x7.news.official@gmail.com Call/Whatsapp us: +91 9961702230

© 2022 Live24x7.news

No Result
View All Result
  • Tech
  • Science
  • Entertainment
  • Sport
  • Health
  • Lifestyle
  • World
  • Celebrities
  • Sports

© 2022 Live24x7.news

Welcome Back!

Login to your account below

Forgotten Password? Sign Up

Create New Account!

Fill the forms below to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In