Fifth is (growing to be) a general purpose programming language running on the .NET tech stack that makes it easy to work with RDF knowledge Graphs.
Here's an example of Fifth in action:
class Person {
Name: string;
Height: float;
Age: float;
Weight: float;
}
calculate_bmi(p: Person {
age: Age | age > 60,
height: Height ,
weight: Weight
}) : float {
return weight / (height * height);
}
main():void {
eric: Person = new Person{
Name = 'Eric Morecombe',
Height = 1.93,
Age = 65,
Weight = 100
};
print(calculate_bmi(eric));
}
See more examples, along with other docs, over on the wiki.
Feel free to dive in! Open an issue or submit PRs.
Fifthlang follows the Contributor Covenant Code of Conduct.
This project exists thanks to all the people who contribute.