Key Takeaways
Last month, at the 2020 edition of .NET Conf, Microsoft released the latest version of F#, together with .NET 5. F# is one of the .NET programming languages, along with C# and Visual Basic. It is functional-first, cross-platform, open-source, and its developed by Microsoft and several open source partners and contributors.
InfoQ interviewed Phillip Carter, program manager at Microsoft, to talk about functional programming, F#, and the new features of F# 5.
InfoQ: What exactly is functional programming?
Phillip: Functional Programming (FP) has several accepted definitions depending on who you talk to. The way I see it, Functional Programming is just programming with functions and orienting your program around some of the properties of functions. Functions take inputs and produce outputs. Do you have some data? Pass it to a function to get a result. Do you have a result that needs to be used to produce another result? Pass that to a function. Do you have a chain of functionality that needs to execute to produce a result? Write several functions and compose them such that outputs from one are inputs to another. If you have a program state, you can change it by passing it to a function and observing the result.
FP and Object-Oriented Programming (OOP) arent really at odds with each other, at least not if you use each as if they were a tool rather than a lifestyle. In FP, you generally try to cleanly separate your data definitions from functionality that operates on. In OOP, youre encouraged to combine them and blur the differences between them. Both can be incredibly helpful depending on what youre doing. For example, in the F# language we encourage the use of objects to encapsulate data and expose functionality conveniently. Thats a far cry from encouraging people to model everything using inheritance hierarchies, and at the end of the day you still tend to work with an object in a functional way, by calling methods or properties that just produce outputs. Both styles can work well together if you dont all in on one approach or the other.
InfoQ: How does F# work?
Phillip: F# works as a somewhat typical compiler in that it reads source code as a string and produces tree-like structures until it finally emits a data format (IL). That process generally looks like this:
However, this isnt the only way that we look at the F# compiler. The compiler isnt just a black box that emits IL from source code. Its also a:
This is because the F# compiler is also run as a server process in IDE tooling. When youre writing code in an editor, the kind of features youre used to need to concurrently access data from different stages of compilation. For example, code folding in an IDE depends on the syntax tree of the source code in your document. Renaming a symbol requires the ability to resolve the symbol your caret is at in a document and distinguish it from others that may have the same name, but dont refer to the same thing (semantic information). And these kinds of features need to be able to be requested concurrently, be cancellable, etc.
So, F# is both a batch process that does a whole lot, but also serves a very different role than most compilers out there.
InfoQ: Microsoft just released F# 5 at the latest .NET Conf. How does it compare with the previous F# versions?
Phillip: F# 5 is our first foray into an adjusted focus for F#. For the past few years, F# has been focused on being a great choice for cross-platform development, and we spent most of our time bringing up various aspects of the F# language, core library, and tooling to work cross-platform. F# 5 finishes this by making F# Interactive work great and it also has some awesome new features like package references that allow you to pull in a package from NuGet interactively.
The F# Interactive work is combined with some extensive support for Jupyter and VSCode notebooks to start our rethink of what interactive programming means for F#. Additionally, data science and ML are domains that heavily involve interactive programming, and so we added some features to make F# a great choice for those domains when combined with other libraries. This is our first journey into this space, and its something F# has traditionally had a strength it, but hadnt been explored since about 2010.
Finally, features like String Interpolation, nameof, open type declarations, and some enhancements to Computation Expressions were done to just make general F# programming even better. We have general areas of focus for each release, but we also bring along a bag of goodies each time we ship a new version, because we recognize that sometimes the best things you do are just making things better for everyone.
InfoQ: What are the advantages of using F# today?
Phillip: Id say that the biggest advantages of using F# today are twofold:
It is a carefully designed language intended to give you tools to get a lot done without writing much code. F# developers, especially new ones, regularly take to Twitter to exclaim how quickly and conveniently they were able to just get some shit done and know that their code is correct because the compiler guided them towards correctness.
The F# community, though smaller than others, is highly engaged and produces a lot of high-quality libraries and guidance in the form of docs and blog posts. If you run into a problem, chances are theres already a post somewhere online explaining how to solve it, or if not, someone will jump to help you out at a moments notice. There is a consistent level of excitement in the F# community and its addicting to participate in.
Whats interesting is that even though F# runs on .NET, which often has an enterprisey kind of reputation, F# itself doesnt really suffer the negative aspects of that kind of reputation. It can be used for enterprise work, but its usually seen as lightweight (as opposed to heavyweight enterprisey languages) and its community is engaged and available as opposed to stuck behind a corporate firewall.
InfoQ: Is F# 5 supported by Visual Studio?
Phillip: Yes, F# is supported in Visual Studio. It has been fully supported since 2010 and has undergone an immense number of improvements since then. As of Visual Studio 2019 version 16.8, it includes a swath of productivity features and code fixes such as IntelliSense, semantic colorization, rename refactoring, navigation features, and more. It also performs quite favorably for very large codebases, something we focused on over the past 2 years working with paying customers who had enormous amounts of code that had to work well.
InfoQ: Can I write and deploy a service or API to the cloud using F# today?
Phillip: Of course! By virtue of running on .NET, F# can run in Azure anywhere that .NET can. Azure App Service, Azure Functions, Cosmos DB, etc. all support F# through their supported .NET SDKs. And when you use .NET 5 (or .NET Core 3.1), you can use standard OSS tools like Docker and Kubernetes for your services and deploy them anywhere.
InfoQ: How is F# being used in the industry?
Phillip: F# has wide usage in the industry today. Its used to power financial engines in banks, F# is used to produce ML models that power insurance models that process billions in claims, F# powers eCommerce infrastructure, and more. But more than anything else, its used to power apps and services that do lots of boring but useful work that developers need to fulfill business requests all across the world. Its not just used in Windows apps or a backend service, though. Through tools like WebSharper or Fable, F# is also used to power the frontend web apps and embed directly in the JavaScript ecosystem. This toolchain is even used to power the F# plugin for VSCode, which is written in 100% F# code.
InfoQ: What is the best way to start learning F# today?
Phillip: The easiest way to get started with F# is to follow our tutorial on the F# homepage for the .NET website: https://aka.ms/fsharphome
But it honestly depends on what youre trying to accomplish. Another great resource for trying out F# for full-stack apps is to look at SAFE-stack.
F# also has a foundation, the F# Software Foundation, which runs various aspects of the F# community and has its own extremely active slack that I always encourage new people to join.
You can also access the F# Software Foundation forms without a (free) membership.
My advice is to ask the community what resources are best based on the kind of things youre trying to build. Youll find great resources online just by doing a quick google search, but the community typically has the best advice to give about which way to start based on what youre trying to accomplish.
Phillip Carter is a Senior Program Manager on the .NET team at Microsoft, focusing on F#, language tooling in Visual Studio, and efforts to expand .NET in non-traditional spaces. Hes been working on .NET and languages for 5 years.
Read the original here:
What's New on F#: Q&A With Phillip Carter - InfoQ.com
- Research, Evaluation and Learning at the International Rescue Committee - World - ReliefWeb [Last Updated On: August 10th, 2020] [Originally Added On: August 10th, 2020]
- Conserving Biodiversity with AI - BBN Times [Last Updated On: August 10th, 2020] [Originally Added On: August 10th, 2020]
- DevOps Fundamentals You Ever Wanted To Know - hackernoon.com [Last Updated On: August 10th, 2020] [Originally Added On: August 10th, 2020]
- Another Perspective on Evictions - Bacon's Rebellion [Last Updated On: August 10th, 2020] [Originally Added On: August 10th, 2020]
- Amitabh Bachchan on fans alternate job suggestion: My job is now insured - The Indian Express [Last Updated On: August 10th, 2020] [Originally Added On: August 10th, 2020]
- Will You Soon Download Packaging Machine Controls from the Internet? - Packaging Digest [Last Updated On: August 10th, 2020] [Originally Added On: August 10th, 2020]
- 5 free resources every data scientist should start using today - The Next Web [Last Updated On: August 10th, 2020] [Originally Added On: August 10th, 2020]
- Who's hoping to make an Epic impact on Green Bay area music scene with a new concert venue? | Streetwise - Green Bay Press Gazette [Last Updated On: August 10th, 2020] [Originally Added On: August 10th, 2020]
- Industrial robots are dominating but are they safe from cyber-attacks? - TechHQ [Last Updated On: August 10th, 2020] [Originally Added On: August 10th, 2020]
- Friday Rant - Rise of the Rogue-Bots? - Diginomica [Last Updated On: August 10th, 2020] [Originally Added On: August 10th, 2020]
- Important Reasons Why You Should Pick RoR As Your Web-Based Development Project - Customer Think [Last Updated On: August 10th, 2020] [Originally Added On: August 10th, 2020]
- Portrait of the software developer as an artist - ComputerWeekly.com [Last Updated On: August 10th, 2020] [Originally Added On: August 10th, 2020]
- Python may be your safest bet for a career in coding - Gadgets Now [Last Updated On: August 10th, 2020] [Originally Added On: August 10th, 2020]
- 1Password is coming to Linux - ZDNet [Last Updated On: August 10th, 2020] [Originally Added On: August 10th, 2020]
- IBM creates an open source tool to simplify API documentation - TechRepublic [Last Updated On: August 10th, 2020] [Originally Added On: August 10th, 2020]
- Mastercard : Accelerate Ignites Next Generation of Fintech Disruptors and Partners to Build the Future of Commerce - Marketscreener.com [Last Updated On: August 12th, 2020] [Originally Added On: August 12th, 2020]
- Expanding the Universe of Haptics | by Lofelt | Aug, 2020 - Medium [Last Updated On: August 12th, 2020] [Originally Added On: August 12th, 2020]
- UX Designer Salary: 5 Important Things to Know - Dice Insights [Last Updated On: August 12th, 2020] [Originally Added On: August 12th, 2020]
- Persistent memory reshaping advanced analytics to improve customer experiences - IT World Canada [Last Updated On: August 12th, 2020] [Originally Added On: August 12th, 2020]
- NextCorps and SecondMuse Open Application Period for Programs that Help Climate Technology Startups Accelerate Hardware Manufacturing - GlobeNewswire [Last Updated On: August 12th, 2020] [Originally Added On: August 12th, 2020]
- Buried deep in the ice is the GitHub code vault humanity's safeguard against devastation - ABC News [Last Updated On: August 12th, 2020] [Originally Added On: August 12th, 2020]
- Top 12 Most Used Tools By Developers In 2020 - Analytics India Magazine [Last Updated On: August 12th, 2020] [Originally Added On: August 12th, 2020]
- Facebook's React 17 JavaScript library: Here's why its top feature is 'no new features' - ZDNet [Last Updated On: August 12th, 2020] [Originally Added On: August 12th, 2020]
- CORRECTING and REPLACING Anyscale Hosts Inaugural Ray Summit on Scalable Python and Scalable Machine Learning - Business Wire [Last Updated On: August 12th, 2020] [Originally Added On: August 12th, 2020]
- Google: Here's how much we give to open source through our GitHub activity - ZDNet [Last Updated On: August 12th, 2020] [Originally Added On: August 12th, 2020]
- How Chriselle Lim And Joan Nguyen Created Bmo, The Coworking Space And Virtual Classroom Of The Future (With A Childcare Twist) - Forbes [Last Updated On: August 13th, 2020] [Originally Added On: August 13th, 2020]
- How Will Public Libraries Adapt To New School Year Norms? - Book Riot [Last Updated On: August 13th, 2020] [Originally Added On: August 13th, 2020]
- Google: We'll test hiding the full URL in Chrome 86 to combat phishing - ZDNet [Last Updated On: August 13th, 2020] [Originally Added On: August 13th, 2020]
- How to install Python 3 and PIP 3 on Ubuntu 20.04 LTS - Linux Shout - H2S Media [Last Updated On: August 13th, 2020] [Originally Added On: August 13th, 2020]
- What are Bitcoin Wallets: Everything You Need to Know - Programming Insider [Last Updated On: August 13th, 2020] [Originally Added On: August 13th, 2020]
- JSHint is Now Free Software after Updating License to MIT Expat - WP Tavern [Last Updated On: August 13th, 2020] [Originally Added On: August 13th, 2020]
- How to learn JavaScript: These are the best online courses - Mashable [Last Updated On: August 13th, 2020] [Originally Added On: August 13th, 2020]
- What developers need to know about inter-blockchain communication - ComputerWeekly.com [Last Updated On: August 14th, 2020] [Originally Added On: August 14th, 2020]
- Introducing the CDK construct library for the serverless LAMP stack - idk.dev [Last Updated On: August 14th, 2020] [Originally Added On: August 14th, 2020]
- IBM asked software developers to take on the wrath of Mother Nature - The Drum [Last Updated On: August 14th, 2020] [Originally Added On: August 14th, 2020]
- Aspire Technology Launches First Truly Secure Public Blockchain for Creation of Digital Assets - GlobeNewswire [Last Updated On: August 14th, 2020] [Originally Added On: August 14th, 2020]
- GM Creates And Shares New Workplace Safety Technologies - Pulse 2.0 [Last Updated On: August 14th, 2020] [Originally Added On: August 14th, 2020]
- Key Considerations and Tools for IP Protection of Computer Programs in Europe and Beyond - Lexology [Last Updated On: August 14th, 2020] [Originally Added On: August 14th, 2020]
- The state of application security: What the statistics tell us - CSO Online [Last Updated On: August 14th, 2020] [Originally Added On: August 14th, 2020]
- Open Source: What's the delay on the former high/middle school on North Mulberry? - knoxpages.com [Last Updated On: August 14th, 2020] [Originally Added On: August 14th, 2020]
- The Risks Associated with OSS and How to Mitigate Them - Security Boulevard [Last Updated On: August 14th, 2020] [Originally Added On: August 14th, 2020]
- news digest: Microsoft launches open source website, TensorFlow Recorder released, and Stackery brings serverless to the Jamstack - SD Times -... [Last Updated On: August 14th, 2020] [Originally Added On: August 14th, 2020]
- Build Your Own PaaS with Crossplane: Kubernetes, OAM, and Core Workflows - InfoQ.com [Last Updated On: August 17th, 2020] [Originally Added On: August 17th, 2020]
- ISRO Is Recruiting For Vacancies with Salary Upto Rs 54000: How to Apply - The Better India [Last Updated On: August 17th, 2020] [Originally Added On: August 17th, 2020]
- Does technology increase the problem of racism and discrimination? - TechTarget [Last Updated On: August 17th, 2020] [Originally Added On: August 17th, 2020]
- CORRECTING and REPLACING Anyscale Hosts Inaugural Ray Summit on Scalable Python and Scalable Machine Learning - Yahoo Finance [Last Updated On: August 17th, 2020] [Originally Added On: August 17th, 2020]
- In the City: Take advantage of open recreation, cultural and park amenities - Coloradoan [Last Updated On: August 17th, 2020] [Originally Added On: August 17th, 2020]
- Exploring the future of modern software development - ComputerWeekly.com [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- Hadoop Developer Interview Questions: What to Know to Land the Job - Dice Insights [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- SiFive Opens Business Unit to Build Chips With Arm and RISC-V Inside - Electronic Design [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- Use Pulumi and Azure DevOps to deploy infrastructure as code - TechTarget [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- Why ASP.NET Core Is Regarded As One Of The Best Frameworks For Building Highly Scalable And Modern Web Applications - WhaTech [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- NITK figures 4th in Google Summer of Code ranking - BusinessLine [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- Learn More About Dynamo for Revit: Features, Functions, and News - ArchDaily [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- Linux Foundation showcases the greater good of open source - ComputerWeekly.com [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- Programming language Kotlin 1.4 is out: This is how it's improved quality and performance - ZDNet [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- Top 10 Languages That Paid Highest Salaries Worldwide In 2020 - Analytics India Magazine [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- Programming language Rust: Mozilla job cuts have hit us badly but here's how we'll survive - ZDNet [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- In-App Bidding Gathers Steam, But Adoption Looks Nothing Like Header Bidding On The Web - AdExchanger [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- 13 thoughts on Fitting Snake Into A QR Code - Hackaday [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- Newham test and trace app was designed by man who grew up in the borough - Newham Recorder [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- 'Trapped in a code' the fight over our algorithmic future - Open Democracy [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- Telegram launches one-on-one video calls on iOS and Android - The Verge [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- AWS Controllers for Kubernetes Will Be A 'Boon For Developers' - CRN: Technology news for channel partners and solution providers [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- Coding within company constraints - ComputerWeekly.com [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- Open Source and Open Standards: The Recipe for Success Featured - The Fast Mode [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- How Intel helped give the worlds first cyborg a voice - The Next Web [Last Updated On: August 21st, 2020] [Originally Added On: August 21st, 2020]
- Tiger Woods, Rory McIlroy near bottom of field at The Northern Trust - ESPN [Last Updated On: August 22nd, 2020] [Originally Added On: August 22nd, 2020]
- Intel Owl OSINT tool automates the intel-gathering process using a single API - The Daily Swig [Last Updated On: August 22nd, 2020] [Originally Added On: August 22nd, 2020]
- IOTA Foundation presents the current projects in the mobility industry - Crypto News Flash [Last Updated On: August 22nd, 2020] [Originally Added On: August 22nd, 2020]
- How 'Fortnite' and 'Second Life' Shaped the Future of Indian Market - Santa Fe Reporter [Last Updated On: August 22nd, 2020] [Originally Added On: August 22nd, 2020]
- Apple Enters $ 2 Trillion Club, Github's Chinese Counterpart And More In This Week's Top News - Analytics India Magazine [Last Updated On: August 22nd, 2020] [Originally Added On: August 22nd, 2020]
- As world grapples with pandemic, schools are the epicenter - ABC News [Last Updated On: August 24th, 2020] [Originally Added On: August 24th, 2020]
- Why Businesses Should Embrace Modernizing Their Legacy Applications - TechBullion [Last Updated On: August 24th, 2020] [Originally Added On: August 24th, 2020]
- Is It Time To Rename RPG? - IT Jungle [Last Updated On: August 24th, 2020] [Originally Added On: August 24th, 2020]
- Phantasy Star Online programmers on breaking new ground and their Diablo-style isometric prototype - Polygon [Last Updated On: August 24th, 2020] [Originally Added On: August 24th, 2020]
- How To Learn To Program In Python By Playing Videogames - Analytics India Magazine [Last Updated On: August 24th, 2020] [Originally Added On: August 24th, 2020]
- New Microsoft program to help develop the quantum computing workforce of the future in India - Microsoft [Last Updated On: August 24th, 2020] [Originally Added On: August 24th, 2020]
- How the Docker Revolution Will Change Your Programming, Part 1 - Walter Bradley Center for Natural and Artificial Intelligence [Last Updated On: August 24th, 2020] [Originally Added On: August 24th, 2020]
- The art of developing happy customers - ComputerWeekly.com [Last Updated On: August 24th, 2020] [Originally Added On: August 24th, 2020]