About this project
Nolang is a new language designed for systems programming, with core design goals of memory safety without garbage collection (GC).
## Language Features
**Memory Safety**: Nolang does not rely on GC, ensuring safety through automatic memory management. Variables are automatically destroyed when function scope ends, and manual release is prohibited to avoid dangling references. Containers such as arrays and slices use value-copy semantics, isolating them from the original variable lifecycle.
**Unified Reference-Passing Model**: All function parameters are passed by reference by default, so modifications within the function directly affect the caller's original data, though the parameter itself cannot be destroyed.
**Scope Variable Overwriting**: When the same variable name is reused within the same function scope, Nolang treats it as an overwrite reassignment rather than creating a new variable. Different types are disallowed at the syntax level, eliminating variable shadowing.
**No Crashes at Language Level**: Eliminates implicit crash paths with no hidden ambiguities.
**Pre-batched Heap Allocation and Batch Release**: Supports pre-batching allocation and batch free on leaving scope, with no hidden allocation costs.
## Toolchain
A complete command-line tool (`no` command) is provided, supporting the following operations:
- `no init` / `no new`: Initialize workspace and create new project packages
- `no fmt`: Code formatting
- `no build` / `no run` / `no test`: Build, run, and test
- `no add` / `no remove` / `no update` / `no sync` / `no list`: Dependency management
- `no install` / `no uninstall`: Binary installation management
- `no pub`: Publish to package registry
- Cross-compilation (specify target) and different backend compilers (e.g., Zig)
Entry conventions: `main.no` is the program entry point, `lib.no` is the library entry point, and all `.no` files under the `tests/` directory are test files.
## Editor Support
- VSCode extension (with LSP server)
- Can be built from source via `make lsp`
## Building from Source
Use the `make` command: `make no` to build the CLI, `make lsp` to build the language server, `make package` to package the VSCode extension, `make playground` to build the WebAssembly online Playground.
## Related Projects
- notools: A Unix command-line tool collection (cat, ls, grep, wc, etc.) implemented in Nolang, showcasing the language's practical application in systems programming.
The project uses the Apache-2.0 license. Official documentation: https://lizongying.github.io/nolang/
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.