Another BEAM language…
The Hamler Programming Language
Hamler is a strongly-typed language with compile-time typechecking and built-in support for concurrency and distribution.
Hamler empowers industries to build the next generation of scalable, reliable, realtime applications, especially for 5G, IoT and edge computing.
For almost a decade, we have been developing software systems based on Erlang/OTP, especially our main product EMQ X - the scalable open-source MQTT broker. So, we have always believed that Erlang is a masterpiece of engineering. With amazing concurrency, distribution and fault tolerance, it is one of the few general-purpose language platforms able to properly handle concurrency and soft realtime.
However, from all the experience writing Erlang, we believe that the following features can help Erlang programmer better adapt to the coming wave of 5G, IoT and edge-programming and attract more people for using BEAM.
- Compile-time type checking and type reference
- ADTs, Function Composition, Type Classes
- More friendly syntax for prosperous communities
- Functor, Applicative and Monad…
Now all the features are avaliable in the Hamler programming language.
- Functional programming
- Haskell and ML style
- ADT and Type Checking/Inference
- Functions, higher-order functions
- Currying and partial application
- Pattern matching, and Guards
- List comprehension
- Applicative and Monad
- Advanced module system
- Built-in concurrency
The Hamler source code is parsed to generate CST, then CoreErlang’s IR is generated after CST -> AST -> CoreFn’s syntax tree transformation, syntax analysis and type checking. The code is then used by the Erlang compiler to generate the final Beam bytecode.
The Hamler compiler architecture is shown below:
The Hamler 0.1 compiler was initially attempted to be implemented based on the GHC 8.10.1, but was later changed to adapt from Purescript Compiler 0.13.6’s