An open API service indexing awesome lists of open source software.

https://github.com/sleepy-monax/udfore

🔣 A safe and statically typed programming language
https://github.com/sleepy-monax/udfore

programming-language

Last synced: 10 months ago
JSON representation

🔣 A safe and statically typed programming language

Awesome Lists containing this project

README

          

![udfore](udfore.svg)

```
take println from io;

type Vector
{
int x;
int y;
int z;

constructor (float x, float y, float z)
{
.x = x;
.y = y;
.z = z;
}

operator + (Vector vector) -> Vector
{
return Vector(
x + vector.x,
y + vector.y,
z + vector.z,
);
}

cast String
{
return `[{x}, {y}, {z}]`;
}
}

let v1 := Vector(1, 2, 3);
let v2 := Vector(4, 5, 6);
let v3 := v1 + v2;

println(`{v1} + {v2} = {v3}`);
```