Javascript’s new functional language, Roy! {2}

by Jongwoo Y
There have been many attempts to replace Javascript, but most have failed miserably. Javascript is the most popular and usually the only choice for the client-side web. Anyone that is interested in programming for web development will most certainly deal with Javascript. Most programmers feel as if Javascript is not a perfect language, and that the flaws are a pain to deal with. There have been many languages that have been released that compile Javascript, but these languages stick too closely to the format of Javascript and with that, they stick too closely to Javscripts semantics (McKenna, 2012). Due to these issues, Brian McKenna, has decided to release Roy, a language that is statically typed, functional, and had lightweight, readable Javascript output (McKenna, 2012). Roy is built around Javascript’s primitives, and the structure uses a structural typing as a form of inheritance. Roy also uses array that are variable-length and homogenous, as in they can only hold values of a single type. It also uses a type system that is of Damas-Milner interface, an algorithm that is global and will work on a program without any type annotations. Lastly, it is written in Javascript, which allows it to compile source code inside the browser and execute programs instantly within the browser; this feature allows programmers to run into less headaches during the development phase. This new language is able to appease many of the issues that web developers and programmers have with the current king of web languages, Javascript (McKenna, 2012). The journal article went on to show examples of Roy’s potential benefits and many other coding examples. The future of Roy looks bright as many developers will be helping contribute to the cause throughout 2012. McKenna and his team of volunteers expect that it will be ready for production systems within a year. read more...