Show HN: I built a programming language, inspired by Golang
by weiwenhao | 2025-05-20 13:20:47+00:00
Hello, I'm the author of the nature programming language, which has reached an early usable version since its first commit in 2021 until today.

---

Why implement such a programming language?

go is a programming language that I use for my daily work, and the first time I used golang, I was amazed by its simple syntax, freedom of programming ideas, ease of cross-compilation and deployment, excellent and high-performance runtime implementations, and advanced concurrency style design based on goroutine, etc. But, golang also has some inconveniences

- The syntax is too concise, resulting in a lack of expressive power.

- The type system is not perfect

- Cumbersome error handling

- The automatic GC and preemptive scheduling design is excellent, but it also limits the scope of go.

- Package management

- interface{}

- ...

nature is designed to be a continuation and improvement of the go programming language, and to pursue certain differences. While improving the above problems, nature has a runtime, a GMP model, an allocator, a collector, a coroutine, a channel, a std, and so on, which are similar to those of go, but more concise. And nature also does not rely on llvm, with efficient compilation speed, easy cross-compilation and deployment.

Based on the features already implemented in the nature programming language, it is suitable for game engines and game development, scientific computing and AI, operating systems and the Internet of Things, the command line, and web development.

When nature is fully featured and optimized, it is expected that nature will be able to replace golang in any scenario (converting to readable golang code, using nature with minimal trial-and-error costs, and switching back to golang at any time). And as a general-purpose programming language, nature can compete with any other programming language of its type. [Note that this is not yet complete.]

---

I know, it's a little late, I spent too much time, just to bring another programming language, after all, the world is not short of programming languages. But when I really think about questions like "Should I continue? Can I do it well?", I realized I had already come a very, very long way.

---

Feel free to give me feedback, I'll answer any questions you may have.

Website: https://nature-lang.org The home page contains some examples of syntax features that you can try out in the playground.

Get started: https://nature-lang.org/docs/get-started contains a tutorial on how to install the program and advice on how to use it.

Syntax documentation: https://nature-lang.org/docs/syntax

Playground: https://nature-lang.org/playground Try it online

---

Contribution Guide

https://nature-lang.org/docs/contribute I have documented how the nature programming language is implemented.

nature has a proprietary compiler backend like golang, but the structure and implementation of the nature source code is very simple.

This makes it easy and fun to contribute to the nature programming language. Instead of just a compiler frontend + llvm, you can participate in SSA, SIMD, register allocation, assembler, linker, and other fun tasks to validate your learning and ideas. You can express your ideas through github issues and I'll guide you through the contribution process.

---

These are some of the smaller projects I've implemented with nature, and I really like the feel of writing code with nature.

https://github.com/weiwenhao/parker Lightweight packaging tool

https://github.com/weiwenhao/llama.n Llama2 nature language implementation

https://github.com/weiwenhao/tetris Tetris implementation based on raylib, macos only

https://github.com/weiwenhao/playground playground server api implementation

---

Lastly, I'm looking for a job, so if you think this project is okay, I hope you'll give me a star, it would help me a lot