Area9 Lyceum Blog

Open sourcing the “Flow” Language: The Advantage for Computer Programmers

Written by Asger Alstrup Palm, Chief Technology Officer, Area9 Group | May 30, 2019 1:04:25 PM

We recently open sourced "Flow", a functional programming language developed by Area9 to solve many of the challenges of developing multi-platform, responsive, enterprise-capable applications. In this blog post, Area9 CTO Asger Alstrup Palm explains the relevance and value of Flow from a programmers point of view.

There is an old philosophical question: If a tree falls in a forest and no one is around to hear it, does it make a sound? While this speaks to observation and perception, it serves as an apt analogy for proprietary software: If a programmer is proficient in using a specialized software that few people have ever heard of, does that experience carry value beyond their current assignment?

At Area9, we knew that this was more than a philosophical point for us as we developed Flow, our own programming language, over the past nine years. As our computer programmers became proficient in developing and using Flow, we wanted this skillset to be as meaningful on their resumes as listing expertise in other computer languages.

Now that Flow is open source on GitHub we have addressed this issue. Our initial release of Flow includes the programming language, incremental compiler, multiple backends, and a standard library—including a best-in-class user interface (UI) library.

Flow is a functional language, which distinguishes it from the more common object-oriented programming languages such as C#. As a functional language, Flow tends to attract programmers who are more mathematically inclined. Functional languages are somewhat more difficult to use initially; thus, proficiency in Flow is meaningful experience for programmers to showcase on their resumes and CVs. As Flow gains visibility in open source, we believe that will also help Area9 attract and retain great programming talent with a desire to work in functional languages.

 

Developing Flow

At Area9, we did not set out initially to develop our own programming language. At first, we tried using Haxe to write software that ran in Flash for browsers. At the time, Flash was the only solution for crunching huge amounts of data in order to calculate the best personalized adaptive learning path for learners. We knew Flash would die in the long run—Area9 recently released Rhapsode BRIDGE™ that enables companies to migrate their Flash content and materials up to five times faster and more cost effectively than alternative solutions. At the time, though, we had little choice but to use Flash and eventually migrate to HTML5.

We could not ignore the fact that smartphones were the wave of the future. Even before mobile apps really took off, we recognized that personal devices would be key for allowing greater accessibility to learning apps. That meant our programming language had to allow apps to “flow” from one operating system and app to another, including iOS and Android.

Now, nine years after Flow was conceived, it is the “engine” behind our recently launched Area9 Rhapsode™, our fourth-generation adaptive learning. Thanks to open sourcing, current and prospective Rhapsode clients can “check under the hood” of the software engine to examine its sophistication and robustness. They can see how Flow has evolved to be a mature, reliable platform. Today, code in Flow is used by millions of users and has proven itself in real life.

 

Flow at a Glance

  • Very light on syntax, easy to learn, read and write. Based on clear semantics in the functional family of languages. Uses a C-style syntax familiar to most programmers.
  • Practical, statically typed with type inference, but also supports dynamic typing when needed.
  • Safe and crash-resistant.
  • Support for building cross-platform UIs with simple code.
  • Garbage collection happens automatically. Objects that are no longer used by an application are collected automatically, which frees up memory. Other languages (e.g., C++) require programmers to track memory usage and collect “garbage” themselves.

 

“Compositionality” for Great Usability

One of the important features of Flow is its succinctness; apps written in Flow require fewer lines of code. For example, the same app written in Flow would take about one-tenth the amount of code written in Java. That has a quality impact as well. Bugs, which are present in all software, tend to occur consistently per lines of code. So fewer lines of code means fewer bugs, which further improves productivity and software quality.

In addition, Flow offers “compositionality,” meaning once code is written, it can be reused in multiple apps and on different platforms. This flexibility increases productivity for programmers; code can be “reused” from one app to the other, the way Lego building bricks can be snapped together in different combinations. It also enhances functionality; for example, the Rhapsode Curator app can bring up the Rhapsode Learner app to preview content as the learner would see it, allowing app to operate within the other.

 

Going with the “Flow”

For programmers who are proficient in Python, C#, or other programming languages, the transition to using Flow should be straightforward, especially for those experienced in the functional family of languages, such as ML and F#. Our own programmers are given two weeks of training to become familiar with Flow. But by looking at the code and reading the documentation available on GitHub, we believe any programmer will be able to begin writing apps and gain more experience with the language.

Now that Flow is open source, we expect it will spark a conversation within the programming community as they develop their own apps. In addition, their feedback and suggestions will help make this functional language even better.