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

  • Hands On: New VS Code Insiders Build Creates Web Page from Image in Seconds

    New Vision support with GitHub Copilot in the latest Visual Studio Code Insiders build takes a user-supplied mockup image and creates a web page from it in seconds, handling all the HTML and CSS.

  • Naive Bayes Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the naive Bayes regression technique, where the goal is to predict a single numeric value. Compared to other machine learning regression techniques, naive Bayes regression is usually less accurate, but is simple, easy to implement and customize, works on both large and small datasets, is highly interpretable, and doesn't require tuning any hyperparameters.

  • VS Code Copilot Previews New GPT-4o AI Code Completion Model

    The 4o upgrade includes additional training on more than 275,000 high-quality public repositories in over 30 popular programming languages, said Microsoft-owned GitHub, which created the original "AI pair programmer" years ago.

  • Microsoft's Rust Embrace Continues with Azure SDK Beta

    "Rust's strong type system and ownership model help prevent common programming errors such as null pointer dereferencing and buffer overflows, leading to more secure and stable code."

  • Xcode IDE from Microsoft Archrival Apple Gets Copilot AI

    Just after expanding the reach of its Copilot AI coding assistant to the open-source Eclipse IDE, Microsoft showcased how it's going even further, providing details about a preview version for the Xcode IDE from archrival Apple.

Subscribe on YouTube

Upcoming Training Events