News

Visual Studio 15 Preview Comes with Salsa

Why does Visual Studio need a JavaScript language service? The Visual Studio team explains in a blog post that it comes down to better JavaScript coding efficiency.

The Visual Studio team is previewing a new feature in Visual Studio "15" that will allow more efficient JavaScript coding. It's available through what's called a JavaScript language service, which the team is calling "Salsa" for now.

So, what's a JavaScript language service and what makes this feature so important from a VS developer's perspective? It has to do with coding efficiency. You don't notice it much if you're writring up C# code in plain old vanilla Visual Studio's IDE, but there are tools like IntelliSense and tool tips and the whole range of tooling features that pop up to assist you in writing that code. To get a similar efficiency while writing JavaScript in the VS IDE, it takes a new engine.

"Essentially, as you typed, a JavaScript engine constantly executed your code to provide "runtime-like" accuracy in completion lists, signature help, and other tooling features," writes Bowden Kelly, a Microsoft Program Manager, in a blog post. "The execution engine was great for handling the more dynamic aspects of the language, however, it also introduced significant complexity and inconsistency," he added.

The issue seems to be even more evident when running long code, which can tend to time out the execution engine as it encountered nested loops or http requests, notes Kelly.

That's where Salsa comes in, which Kelly says uses " the same static analysis that provides type inference in TypeScript."

Why static and not dynamic analysis? Kelly explains: "First, static analysis provides a consistent experience for JavaScript across all Visual Studio setups by eliminating runtime bailouts. Second, JavaScript editing experiences can benefit from existing TypeScript definition to provide richer IntelliSense. Third, JavaScript inherits support for features from ES2015, ES2016 and beyond that currently exist in TypeScript."

Kelly notes in his blog that Salsa needs to be enabled, since it's not available by default. As Salsa gets more refined, he said to expect an improved automatic type acquisition feature, as well as support for @constructor and @typedef in the JSDoc specs. And of course, the team is always looking for participation and feedback.

Salsa is available in the Visual Studio 15 Preview here.

About the Author

You Tell 'Em, Readers: If you've read this far, know that Michael Domingo, Visual Studio Magazine Editor in Chief, is here to serve you, dear readers, and wants to get you the information you so richly deserve. What news, content, topics, issues do you want to see covered in Visual Studio Magazine? He's listening at [email protected].

comments powered by Disqus

Featured

  • Microsoft Extends Low-Code Push with Power Fx Programming Language

    "Using formulas that are already familiar to hundreds of millions of users, Power Fx allows a broad range of people to bring skills they already know to low code solutions."

  • Microsoft's Tools to Fight Solorigate Attack Are Now Open Source

    Microsoft open sourced homegrown tools it used to check its systems for code related to the recent massive breach of supply chains that the company has named Solorigate.

  • Microsoft's Lander on Blazor Desktop: 'I Don't See a Grand Unified App Model in the Future'

    For all of the talk of unifying the disparate ecosystem of Microsoft-centric developer tooling -- using one framework for apps of all types on all platforms -- Blazor Desktop is not the answer. There isn't one.

  • Firm Automates Legacy Web Forms-to-ASP.NET Core Conversions

    Migration technology uses the Angular web framework and Progress Kendo UI user interface elements to convert ASP.NET Web Forms client code to HTML and CSS, with application business logic converted automatically to ASP.NET Core.

Upcoming Events