Here are few more often cited reasons:
- open source and private languages evolve faster, have more features
- sometimes less code
- better code
- organized code
- more language features
- leverage existing talent
- leverage existing libraries
- more efficient runtime
- developers are more productive
- future proof
- clearer code
In 1981, Digital Research had a program that converted ASM source code for the Intel 8080 processor into A86 source code for the Intel 8086.
In 1983 Cfront was the original compiler for C++ which compiled C++ to C.
In 2000, the LLVM project was created with a collection of modular and reusable compiler and toolchain technologies. It is used for compiling a variety of of gcc 4.2.1 languages to C. A few of these include Lisp, ActionScript, Ada, D, Fortran, OpenGL, Go, Java, Objective-C, Python, Ruby, C#, and Lua are just a few.
In 2006, Google released Google Web Toolkit, called GWT. It enables developers to build cross browser web applications in Java.
Many other source to source compilers have been written forÂ everything to Fortran to Python to either convert an older language to a newer platform, or from an old API to a new one.
- classes with inheritance and super keyword which abstracts away Object.prototype
- fixes == equality to work as expected
- arrow functions and other shortened initializers for terse code
- shortened loop syntax with optimized output and additional keywords
- literate coffeescript option which allows code to be written in Markdown
- lexical soping of variables (i.e. no need for var keyword)
- terse if else then statements, no parentheses or brackets required
- rest based parameters
- array slice syntax similiar to Python
- implied return statement, no need to type it
- statements converted to expressions inside closures
- uses english for equality operators and compiles down to safe usage
- provides existential operator for checking existence of variables
- Array/Object destructuring which allows for multiple return values from functions
- Function binding for ensuring this scope remains intact
- safter switch statements
- chained comparrisons
- String interpolation
- multiline and block strings
- Block Regular Expressions (borrows from Perl’s /x)
- terse code
TypeScript provides opt-in static typing, class and module syntax, and is based on the ES6 spec. It was created by Anders Hejlsberg of Turbo Pascal, Delphi, and C# fame. Benefit is strong typing with ability to use against 3rd party libraries, package & classes, and backed by Microsoft.
- define strongly typed globals via declare
- integrate strong typing to 3rd party libraries via declaration files
- strong typing for both built-in primitives, classes, and interfaces
- type inference with basic primitives, classes, and interfaces
- interfaces can be applied to basic Objects and classes
- function literals
- class constructor initializers
- default parameters
- multiple constructor signatures
- class inheritance with super keyword
- package support via private and public modules
- compiler supports generating AMD or CommonJS modules
- arrow syntax for function binding
- … and a lot more.
- strong typing allows larger projects and teams to find bugs early w/o writing unit tests
- Offers package management for classes, unlike CoffeeScript
- Like CoffeeScript, a lot of syntactic sugar
Same as TypeScript. The two additional ones are class metadata annotations and runtime assertions for type safety at runtime. The class metadata annotations are used to denote the Angular component types without having to inherit from a specific class or work within a specific lifecycle API. While it may seem Angular specific, any framework can benefit from class and variable metadata annotations consumed at runtime. Aurelia is another MVC framework thatÂ supports AtScript.
All the Pros of TypeScript including:
- your types being enforced at runtime
- can swap out the assertion library with your own
- easier & more readable way to declare Angular component types compared Angular 1.0’s methods
- backed by both Google and Microsoft
Same as TypeScript, including at the time of his writing, these features are in active development.
- functional language, dialect of Lisp
- runs on the JVM
- supports concurrency written in a synchronous way like Go
- optional type hints and type inference to avoid Java reflection
- immutable data structures
- same language used on the server
- one language for front end and back-end development
- supports streams and promises native to the language
- immutable data structures are the norm with mutable support enabling easy concurrency with rewind testing support
- this makes working with React’s shouldComponentUpdate method insanely efficient and succinct to write
- Clojure is a Functional Language
- No popular MVC frameworks ported yet (ie Angular, Backbone, Ember). Although one can utilize Purnam, most of these MVC frameworks are OOP based and encourage Clojure Models to be some sort of atom as opposed to being Functional based and using Collections and Streams as the Models.
- … like the Pro, Clojure is a Functional Language
ECMAScript 6 to ECMAScript 5
- modules – standardized way of organizing code like Java packages
- module loading supporting dynamic loading, execution sandbox, and module cache manipulation
- private variables
- tighter code through arrow functions, object literals
- template strings – safer string creation without a library
- destructuring with soft fail pattern matching
- iterators like Java and “for of”Â support
- generators for creating green threads for long running processes
- Map, Set, and Weak versions – updated collection data structures commonly used
- Proxy support
- Symbols, more powerful Strings for lookups in Maps and Objects
- easier to sub-class native classes
- various new API’s to String, Number, Object, and Math
- native Promises
- reflection api for easier Proxy creation and other higher level tooling
- tail calls – safer recursion
- most ES6 features
- you’re coding the future, today
- various features that aren’t yet implemented are emulated via shims/polyfills that perform well enough
- using technology based on web standards ensuring longer term support
- generators cannot be effectively polyfilled, though polyfills do exist
- modules and their loaders do not solve module problem thoroughly… yet. They are client specific, avoids Common JS, and makes sharing code with Node/io.js challenging. Solution is to use Browserify and put ES6 classes on module.exports.
- This includes syntax, code quality, and coverage tooling as well.
- Dart SDK – libraries for client and server, cross browser DOM and other HTML5 API abstractions.
- pub – package management system, much like npm or bower
- Dart Editor – Eclipse based IDE with code hinting, intellisense, and basic refactoring abilities. Includes a GUI on top of pub so you can add/remove dependencies as well as create you own.
- Dart VM – runtime utilizing .dart code to run in a virtual machine for great speed. Currently implemented in Chromium with future plans to bring to Chrome and hopefully implement in other browsers.
- language better suited for larger teams & applications built from scratch specifically for building client and server web applications
- Built & run by Google
- Core part of the Angular 2.0 build lifecycle
- A suite of tools for building web applications
- Where Chrome only is an option (kiosks, enterprise networks, etc) Dart VM helps gain fast speed, yet not having to use C/C++ for Native Client development
- same language & libraries used on client and server
- easier runtime module creation with retained strong-typing for application optimization (as opposed to custom grunt/gulp builds + ocLazyLoad or require.js packaging).
- supports debugging directly from an Android device
Thanks to Alan ShawÂ andÂ Daniel Glauser (hire Daniel) for the impromptu Google Hangouts to give my peers and I the lo down on Clojure. Thanks to David Nolen for answering my questions and hooking me up with some good Clojure resources to learn. His blog is crazy and awesome, btw, encourage you to read even if you’re a clientÂ dev.Â Thanks to Joel Hooks, Robert Penner, and Ben Clinkinbeard for clarifying some some finer points and sharing code. Thanks to beer for helping me get through Clojure training.
Title artwork by Ry-Spirit.