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 Revamps Fledgling AutoGen Framework for Agentic AI

    Only at v0.4, Microsoft's AutoGen framework for agentic AI -- the hottest new trend in AI development -- has already undergone a complete revamp, going to an asynchronous, event-driven architecture.

  • IDE Irony: Coding Errors Cause 'Critical' Vulnerability in Visual Studio

    In a larger-than-normal Patch Tuesday, Microsoft warned of a "critical" vulnerability in Visual Studio that should be fixed immediately if automatic patching isn't enabled, ironically caused by coding errors.

  • Building Blazor Applications

    A trio of Blazor experts will conduct a full-day workshop for devs to learn everything about the tech a a March developer conference in Las Vegas keynoted by Microsoft execs and featuring many Microsoft devs.

  • Gradient Boosting Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the gradient boosting regression technique, where the goal is to predict a single numeric value. Compared to existing library implementations of gradient boosting regression, a from-scratch implementation allows much easier customization and integration with other .NET systems.

  • Microsoft Execs to Tackle AI and Cloud in Dev Conference Keynotes

    AI unsurprisingly is all over keynotes that Microsoft execs will helm to kick off the Visual Studio Live! developer conference in Las Vegas, March 10-14, which the company described as "a must-attend event."

Subscribe on YouTube