https://github.com/yuminaa/yu-lang
language + compiler
https://github.com/yuminaa/yu-lang
compiler-construction compiler-design cpp20 ir language-design programming-language
Last synced: 6 months ago
JSON representation
language + compiler
- Host: GitHub
- URL: https://github.com/yuminaa/yu-lang
- Owner: yuminaa
- License: mit
- Created: 2024-12-10T09:06:52.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-16T18:00:04.000Z (about 1 year ago)
- Last Synced: 2025-03-23T10:17:17.826Z (10 months ago)
- Topics: compiler-construction, compiler-design, cpp20, ir, language-design, programming-language
- Language: C++
- Homepage:
- Size: 140 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Yu Programming Language
[](https://github.com/yuminaa/yu-lang/actions)
[](https://opensource.org/licenses/MIT)
Yu is a statically typed, compiled programming language designed for data-oriented programming while maintaining
familiar OOP-like syntax. It emphasizes data layout, cache coherency, and efficient memory patterns while providing a
comfortable, modern programming interface.
> [!IMPORTANT]
> The compiler is currently under development and not ready for production use.
## Philosophy
Yu uses class-like syntax as a familiar interface for defining data structures and their associated operations, but
internally treats data and behavior separately.
## Code Example
```yu
import { io } from 'sys';
@align(16)
class Vector3
{
var x: i32 = 0;
var y: i32 = 0;
var z: i32 = 0;
};
class Player : Entity
{
private var position: Vector3 = Vector3({ x = 10, y = 20, z = -10 });
private var velocity: Vector3 = Vector3();
public operator new() -> Player
{
return new Ptr();
}
public function MoveTo(target: Vector3) -> void
{
this.position = target;
}
};
class Generic
{
var value: T;
public function GetValue() -> T
{
return this.value;
}
};
```
# Roadmap
- [X] Lexer
- [ ] Parser
- [ ] Semantic Analysis
- [ ] Code Generation
- [ ] Optimization
- [ ] Standard Library