Facebook researchers have developed Flow, an open source debugging tool for JavaScript designed to highlight problems caused by the misuse of data types.
Flow, which Facebook has used on many of its own projects, "improves speed and efficiency so developers can be more productive while using JavaScript," according to Facebook engineers. Flow is a static type checker, ensuring when a program is run that its variables, functions, and other code elements will adhere to their original specifications. The tool can check to see if a value assigned to a variable is the correct type, and to see if a function has passed the correct number of inputs. The researchers say these types of error checks could avert program failures and help secure the program against malicious misuse.
Flow differs from TypeScript because it enables the developer to check only portions of the code, and does not require the programmer to compile the program for inspection. It also functions in the background, and it can check standard primitive types such as numbers, strings, and Boolean values along with structured types such as functions, objects, and arrays.
Flow is initially available as a plug-in for both the Emacs and Vim code editors, but Facebook says versions for other editors may be issued later.
From IDG News Service
View Full Article
Abstracts Copyright © 2014 Information Inc., Bethesda, Maryland, USA
No entries found