gitmyhub

xgo

Go ★ 9.4k updated 9h ago

XGo is a programming language that reads like plain English. But it's also incredibly powerful — it lets you leverage assets from C/C++, Go, Python, and JavaScript/TypeScript, creating a unified software engineering ecosystem. Our vision is to enable everyone to become a builder of the world.

XGo is a beginner-friendly programming language built on Go that removes boilerplate syntax and lets you call code written in C, C++, Python, and JavaScript from a single project.

GoLLVMCC++PythonJavaScriptWebAssemblysetup: moderatecomplexity 3/5

XGo is a programming language designed to be simpler to read and write than most existing languages, with a stated goal of being approachable enough for beginners including students and children. It is built on top of Go, a programming language created by Google, and is fully compatible with it, meaning XGo code and Go code can live side by side in the same project.

The language removes or shortens a lot of the structural requirements that Go and Python have. For example, you do not need to declare a main function or a package header to run a program. The syntax for common things like lists, maps, and string formatting is shorter and closer to plain writing. The README includes a comparison table showing how various Go patterns translate to shorter XGo equivalents.

XGo is also designed to work with code written in other languages. Through a companion compiler called LLGo, which is based on a widely used compiler technology called LLVM, XGo programs can call libraries written in C, C++, Python, and JavaScript. This is aimed at areas like game development, data science, and running code on embedded hardware or in the browser via WebAssembly. The default setup uses the standard Go compiler, with LLGo as a future default.

The project targets three audiences: working engineers who want a simpler language for large projects, students learning programming through a language they will actually use in professional work, and data scientists who want to share a common language with software engineers on their team.

Documentation, a tutorial site, an online playground, and an interactive prompt where you can try XGo in the browser are all available through the project's website at xgo.dev. The source code is open and contributions are documented in a contributing guide in the repository.

Where it fits