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


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.

The whole concept of why the project for Roy was initiated was very interesting as it basically stated that nearly all developers and programmers in the web industry are not very appeased with the current state of programming languages available to them, especially JavaScript. Though the language that the article was using was somewhat tough to comprehend, it was pretty cool that the author, Brian McKenna, was actually the head of the project in developing Roy. I also found that it was very intriguing to see how in depth the author went into the descriptions and uses for the new programming language. There were pages of examples on what Roy could do better than the current Javascript and how it could be used on a daily basis by most developers that were interested in programming for web applications. McKenna was also able to state some of the things that he planned to integrate in the future which I thought was pretty cool. This whole project seems like it is being made for the right reasons and I am excited to see how popular this new language can become. Maybe we will learn about Roy in the near future in CIS 311, rather than Javascript.

This article is able to relate quite closely to the things that we have been learning in class due to the fact that we actually spent quite a while of time on learning about Javascript. Learning Javascript was great as it gave us more options to customize our website and add features to our projects that made our SaaS look more professional and legit. Through Javascript, we were able to add features to our projects such as moving slideshows and also incorporate password strength meters and validation. These things were essential to our websites as they gave us a more professional look and the ability to stylishly promote our product. Another thing it allowed us to do was add essential security measures to our websites. Without validations and a password strength meter, our websites would have been very vulnerable to attackers on the most basic level. However, one thing I noticed was that Javascript wasn’t really as bad as to me as it was described in the article. Though it can be said that my experience with Javascript isn’t as robust as most prominent developers, the language didn’t seem illogical in my eyes. Hopefully this new release of Roy is able to open my eyes and show me why so many people have been looking to replace Javascript.

McKenna, B.; , “Roy: A Statically Typed, Functional Language for JavaScript,” Internet Computing, IEEE , vol.16, no.3, pp.86-91, May-June 2012
doi: 10.1109/MIC.2012.56
URL: http://0-ieeexplore.ieee.org.opac.library.csupomona.edu/stamp/stamp.jsp?tp=&arnumber=6188583&isnumber=6188571