Gnolang introduction

Gnolang is the language used to write Smart Contracts, called Realms, and Packages on Gnoland. You can see it as an interpreted version of Golang: developers upload their realm sources on-chain and the GnoVM executes its AST interpretation.

This way Gnoland pushes for full transparency, because it forces developers to push their sources, and not compiled bytecode.

Why Gnolang?

Gnolang tries to solve the two adoption problems most blockchain have:

  1. learning curve: development of a Smart Contract often implies learning a new dedicated language (ex: Solidity on Ethereum) or specific libraries. This creates onboarding friction for developers, especially because each blockchain has its own stack.
  2. immaturity: tooling and documentation is often immature (compared to mainstream programming languages like JS or Go) which makes it hard for developers to progress fast and get help

The goal of Gnolang is to be as close as possible to Go and make sure that as a developer you get almost the same development experience and follow the same practices.

Tip: When you encounter an issue in your Gnolang code, you can often find the answer by googling your error with the “Go” keyword.

package hello func world() string { return "world!" } func Render(path string) string { return "Hello, " + world() }

For who?

For Golang developers

If you are already experienced with Golang, your onboarding to Gnolang will take a few minutes. You will find similar standard library and packages than what you typically use in Go.

For Open Source lovers

As Realms and Packages sources are directly pushed and interpreted on-chain, Gnolang code is public by default, which makes it easy to read and fork.

Gnolang is also open source and looking for contributors to help developing the standard library, community packages, and the GnoVM. See the Contributions documentation.

For any developer really

Go is one of the easiest language to learn as a developer, its syntax and main principles are pretty straightforward and it does not require a lot of tooling to get started. Gno tries to be as close to Go as possible on this. If you have never used Golang for your projects, don’t worry, you can learn it by doing some Gno code!

Previous doc: Tokenomics

Next doc: Local Setup