|
Polyglot 13: Dart27 August 2015 Long-time readers will remember the polyglot series of posts where I implemented the same program in Perl, VB, Java, JavaScript, Euphoria, PHP, Python, POV-Ray, SVG, Moo, Smalltalk, C, and R. It has been a while since I learned a new language, so I decided to take Dart out for a spin. Dart is basically JavaScript done right. The Dart team have created a really nice language, designed with both the programmer and the tools in mind. Programmers get a flexible language with an extensive standard library and a minimum of boiler plate (no RequestProcessorFactoryFactory). Tools (editors, compilers, linters) can parse the code to perform static analysis and help catch bugs early. Dart code compiles to clean and efficient JavaScript code for client-side execution, or it can be run natively in a VM server-side. If you are starting a large project, I highly recommend choosing Dart. The colourful image above is rendered in a canvas by Dart (reload to generate random new colours). Here is the source code: colours-dart.dart |