Also eyed for version 6 is binary data support, which enables activities such as reading a binary file or binary network protocol. "You could do things like read the contents of a PDF file" without being forced to represent items as strings, said Herman. Binary data capabilities are useful in data-intensive applications and can provide memory and possibly time savings, he added.
A new generators capability in version 6 will make it easier to express a sequence of events in Web programs. Generators boost asynchronous programs, Herman said. Another new capability, string interpolation, will enable variables to be embedded inside a string. Adding a sanitizer to a string prevents the injection of malicious code. ECMAScript 6 will gain additional programming conveniences, such as syntax improvements, as well.
Sign up for MIS Asia eNewsletters.