Flow9 Programming Language Sources Opened

Company Area9 opened functional programming language source code Flow9focused on creating user interfaces. Flow9 code can be compiled into executable files for Linux, iOS, Android, Windows and macOS, as well as translated into web applications in HTML5/JavaScript (WebAssembly) or source code in Java, D, Lisp, ML and C++. Compiler Code open licensed under the GPLv2 and the standard library under the MIT license.

The language has been developing since 2010 as a universal and multi-platform alternative to Adobe Flash. Flow9 is positioned as a platform for creating modern graphical interfaces, which can be used for both Web and desktop and mobile applications. The project is used in many internal projects of Area9 and was originally called Flow, but before opening the code, it was decided to rename it to Flow9 to avoid intersections with the statistical analyzer Flow from Facebook.

Flow9 combines familiar C-like syntax (see below). comparison code in Flow9 and JavaScript), with functional programming tools in the style ML ΠΈ opportunities domain-specific languages ​​focused on solving specific problems as efficiently as possible (for Flow9, this is interface development). Flow9 is designed to use strong typing, but if necessary, it is possible to use dynamic typing with automatic type detection, as well as links. Polymorphism is supported (one function can process data of different types), the ability to create subtypes, modules, arrays, hashes, lambda expressions.

The same code can be built for different platforms without the need for separate porting and code changes. The same application can run in a browser, mobile devices with touch screens, and desktop systems with a keyboard and mouse. We offer a ready-made collection of components with interface elements in the React style, designed in accordance with the concept of Google Material Design. Appearance can be controlled down to the pixel level. To set styles can use standard CSS syntax. For rendering on Linux, macOS, and Windows when compiled to C++ used a Qt-based backend with OpenGL, and when compiled to Java, JavaFX.

Thanks to the use of functional programming methods, the written code and interface components can be easily borrowed in other projects. The language is very compact and includes only 25 keywords, and the grammar description fits into 255 lines along with comments. To implement identical functionality on Flow9, 2-4 times less code is required than on HTML+CSS+JavaScript, C#, Swift or Java. For example, if for the Tic-Tac-Toe test application from leadership React required 200 lines of code in React/JavaScript/HTML/CSS, Flow9 managed to meet 83 lines. At the same time, this application can not only be launched in a browser, but also compiled into the form of mobile applications for iOS and Android.

The platform includes the main flowc compiler, written in Flow9 and capable of acting as a compilation server; flow reference compiler (written in knuckle); debugger with gdb protocol support; a profiling system with a memory analyzer and a garbage collector debugger; JIT compiler for x86_64 systems; interpreter for ARM and other platforms; tools for selective compilation in C++ and Java of the most performance-critical parts of the code; plugins for integration with Visual Code, Sublime Text, Kate and Emacs code editors; parser generator (PEG).

Source: opennet.ru

Add a comment