Introduction to Hachi

Because Programming Shouldnāt Be a Chore
Hachi is a lightweight, native-focused programming language designed to feel dynamic and expressive like a higher-level language while delivering the speed and control of a compiled one. It is statically typed, compiled, and built around a practical approach to automatic memory management.
The goal behind Hachi is simple: native programming should not feel heavier than it needs to. Hachi aims to reduce friction, cut down on ceremony, and make it easier to build fast software without fighting the language every step of the way.
The philosophy behind Hachi is simple: it should feel like a bucket of Legos. Language components are straightforward, flexible, and easy to combine in whatever style makes sense for the task at hand. Whether you prefer object-oriented, procedural, or functional patterns, Hachi avoids rigidity and encourages a more free-form style of programming.
Hachi started as a personal experiment to simplify and abstract away messy C and C++ compilation work. Over time, it became clear that it could grow into something more than a one-off project. While it was originally built to suit my own needs, I decided to make it open source in the hope that others might find it useful too.
The language is named after my dog, Hachiko, a free-spirited husky whose personality matches the languageās design philosophy. Hachi is meant to feel unencumbered, straightforward, and fun to use.
Why Hachi?
Hachi lives in a space that many mainstream languages handle awkwardly: software that needs to stay close to native execution, but is still pleasant and fast to write.
It is designed for developers who want:
- a lighter and more expressive workflow than C++
- a more native-oriented and transparent model than Python or JavaScript
- practical interoperability with low-level code
- less boilerplate and less ceremony in day-to-day development
- a language that stays flexible instead of forcing one rigid programming style
Rather than hiding the lower-level world behind a large managed runtime, Hachi embraces a more direct model. It aims to give developers high-level ergonomics while keeping native workflows, performance, and control within reach.
That makes Hachi especially appealing for things like:
- command-line tools
- systems utilities
- automation
- native helper programs
- performance-sensitive glue code
- projects that need a bridge between scripting ergonomics and systems-level control
Compatibility
Hachi requires no external dependencies beyond a working C++ toolchain. Installing clang++ and running make in the repository root is enough to get started. Some optional modules may require additional dependencies.
Make sure you have clang++ with at least C++11 support installed.
Hachi has been tested successfully on Linux.
Features
Standard Features
- Primitive data types:
Bool,Int,Dub,String - Standard operators:
+,-,*,/,%,&&,>,<,=>, and others - Single-line and multi-line comments
- Flow control: conditionals and loops
- Constants
- Data structs, tuples, and arrays (
IntArray,StringArray) - Hash maps
- Functions
- String operations and user input
- Running system commands
AnyTtype- Pass-by-reference
- Operator overloading
- File importing
- Anonymous functions
Unique Hachi Features
- Embed C++ code directly inside Hachi files
- Automatic memory cleanup when values go out of scope
- Implicit variable creation with type inference
- Functions with no arguments are accessed like variables
- Assignments and function calls use a colon (
:) instead of= - Tuples, structs, and class-like objects share a unified syntax
- Arguments can be passed to functions from either side:
(inputLeft.function: inputRight) - Control flow uses operators instead of keywords:
@for loops?for conditionals
Hachi aims to provide powerful features without unnecessary complexity, encouraging experimentation and flexibility while retaining the speed and directness of a compiled language.