Rell recently got an update to Version 0.10.3, which entails general language improvements as well as some blockchain-related features. This update can be seen in line with ChromaWay’s philosophy of incrementally building and improving, along the lines of what actual serious and useful projects running on it require.
For Chromia, reaching “mainnet” is a process of a continuous refinement on a path towards maturity and mass adoption. Particularly, the recent increasing relevance of Decentralized Finance (DeFi) applications made it an important feature for the Hedget project (that is being built on Chromia) to provide an API for Ethereum integration.
Let’s take a closer look at the most noteworthy language improvements done over the last several months.
Improved imports. In addition to whole module imports, Rell now supports import of specific definitions and wildcard imports of definitions.
Improved functions. Specifically:
- Return type inference. No need to specify function return type explicitly; it will be deducted from the code.
- Default parameter values. Parameters of user-defined functions may have default values, in which case it’s not necessary to pass values for those parameters when calling the function.
- Named function arguments. When calling a function, parameters can be passed by name, not only by position. This can make the code more readable and allows to pass parameters in an arbitrary order, which is especially useful in combination with default values.
Grouping and aggregation. At-expressions now have a possibility to group and aggregate values, which is done in SQL using the GROUP BY clause.
REPL shell. Rell interpreter now has a REPL (Read–eval–print loop) shell, which allows to type and execute fragments of Rell code in the console. There is a possibility to import user-defined modules, call functions and queries and even invoke operations by creating and executing transactions, what can be quite useful for testing and debugging.
Guard block. A block of code which checks operation parameters and can be used for early rejection of invalid transactions. This enables better user experience, since the backend of decentralized applications (dapps) running on Chromia can communicate errors back to the front-end fast and easy. Dapp can customize its usage policy, like using rate limiting instead of fees. So far it's added in Rell only on a syntactic level, yet it's a step towards a fully customizable usage policy.
Cryptographic functions for Ethereum integration. Rell got a couple of new functions. keccak256() and eth_ecrecover(). Keccak256 is the cryptographic hash function used in Ethereum. The other function allows to extract a signer’s Ethereum address from a signature.
Those and other improvements bring Chromia one step forward to creating a blockchain platform with a technical solution that is geared for real world use at scale. Interested developers can check out www.chromia.com and www.rell.chromia.com to learn more.