Hackernoon logoTurbocharging Multi-Language Support on Koinos by@andrarchy

Turbocharging Multi-Language Support on Koinos

andrarchy Hacker Noon profile picture


CEO of Koinos Group, creators of the Koinos blockchain

In this episode of the Koinos Group podcast, co-founder and Koinos blockchain architect Nathan Caldwell talks about the special programming language we are architecting to make it easier for developers to add support for more programming languages to Koinos. 

As Nathan explains, at Koinos Group we are obsessed with cultivating a super developer-friendly environment, which is why Koinos is so highly modularized.

That modularization enables developers to understand every piece of the system without having to understand any other piece. 

Koinos Types takes the developer-friendliness of Koinos to the next level by enabling full-stack multi-language support, but as we were working on Koinos Types we realized that having to use the programming language C to target languages created a poor developer experience which would negatively impact the rate at which Koinos could be improved.

Audio Podcast

Koinos Types

Koinos Types is like the Rosetta Stone for blockchain data structures. It allows programs written in different languages to talk to one another in a simple and unified way by giving them access to the same objects (the “building blocks” of modern programming languages).

Koinos Types allows for the interpretation of Koinos (i.e. blockchain) data structures into practically any programming language which will be extremely useful for the development of blockchain-related microservices, clients, and smart contracts. You can learn more about Koinos Types here.

One of the things we realized while working on Koinos Types in the programming language C was that the general utility of C actually made it more difficult to target languages with Koinos Types.

This would slow down the rate at which Koinos could acquire support for new languages because it would be more difficult for developers to work with Koinos Types. 

What v. How Languages

In order to represent the Koinos Types in different languages, they must be declared. Since Koinos Types already had C as a supported language, it made sense to use C to specify types which also helped us to get off the ground quickly.

The problem is that C is not ideal because like most programming languages it can be used to specify both the “what” and the “how” of a program. 

C can be used to program both what a given thing should do, and how it should be done. But the whole point of Koinos Types is just to specify the “what” of the blockchain, not the “how.” It literally specifies what objects Koinos possesses and that’s it.

In the blockchain context, this specific task provides incredible value. But if we make developers use C to specify types, they would be misled into thinking that they could, and maybe should specify how these objects work when this is not necessary or ideal for Koinos Types. This would only slow progress and lead to confusing implementations. 

Types Specification Language

That’s why we decided to architect a special programming language dedicated to specifying the “what.” This language can’t possibly be used to specify the “how,” which is why it’s called a “specification language.”

This will be very user-friendly because it has a simple grammar that is custom-tailored to just specifying types. This “buttons down” the supported feature set which makes it so much easier for developers to understand how you convert these objects into the target language. 

We are developer-obsessed which means that we want to cultivate a super developer-friendly environment. That’s why Koinos is so highly modularized. That modularization enables developers to understand every piece of the system without having to understand any other piece. 

Koinos Types takes the developer-friendliness of Koinos to the next level by enabling full-stack multi-language support. We’re not just talking about being able to write smart contracts in additional languages. We’re talking about being able to write smart contracts, AND microservices, AND client-libraries in ANY language, and making that support easy to add, maintain and upgrade.  

Rapid Improvement

Architecting this specification language might not appear to be a good use of time if you’re used to projects that are designing their protocols around a single feature like transactions per second or sharding. But we’re designing Koinos with the objective of creating a blockchain that improves at a more rapid rate than any other blockchain out there, and that’s exactly what the Koinos Types specification language will feed in to. 

The microservice architecture will enable us to improve the node software at a rapid rate. Modular upgradeability will enable us to upgrade the system logic of Koinos at a rapid rate. Koinos Types will pour gasoline on that fire by enabling developers to work on those components in the programming languages they already know and that are the best tools for the job, but the Koinos Types specification language will pour rocket fuel on top of the gasoline to make it even easier and faster for developers to target new languages which will then give developers even more tools to choose from. 

When Koinos mainnet launches it won’t have all of the nifty tools that older and more mature blockchains have, which is why it is critical to ensure that Koinos can acquire those tools at a more rapid rate so that it can not only catch up to older protocols, but ultimately outpace them. At that point, not only will Koinos have all the "bells and whistles" but it will also have a younger, and more state-of-the-art architecture. Koinos Types, and their dedicated specification language, are key to accomplishing that objective. 

“As soon as you’ve made the assumption that you’ve done something right, you’re probably wrong.” - Nathan Caldwell

To learn more about Koinos, go to koinos.io


Join Hacker Noon

Create your free account to unlock your custom reading experience.