Announcing Fifth: A New Language For Knowledge Graphs

For a long time I’ve found working with RDF, graphs, and SPARQL more awkward than it should be. While mainstream languages give us straightforward ways to handle lists, classes, and functions, the moment you step into semantic web technologies, the experience often feels bolted-on and cumbersome.

I wanted to see if it was possible to design a language where RDF and SPARQL felt like natural parts of the syntax—no different from writing a loop or defining a class. That idea led to Fifth, a small language built on .NET. It’s strongly typed, multi-paradigm, and borrows familiar constructs from languages like C# and Erlang, but with RDF and SPARQL built in as first-class features.

What Fifth Offers Today

  • Classes, methods, properties, and control flow you’d expect from a general-purpose language.
  • Function overloading with guard clauses and parameter destructuring.
  • Native RDF primitives: graph, triple, store, query.
  • Inline triple literals (<subject, predicate, object>).
  • Multi-line TriG blocks for graph construction.
  • Embedded SPARQL queries as literals (?<SELECT ...>).
  • Operator syntax for clean graph and store manipulation.
  • A working Roslyn-based compiler pipeline with IL emission.

Status

Fifth is a working language, but it’s not mature or polished. Think of it as a prototype you can experiment with rather than something ready for production. It compiles, runs, and supports knowledge graph operations, but there are plenty of rough edges and missing features.

Why Share This?

The project isn’t intended to compete with established languages or claim any big theoretical advances. It’s simply an exploration of whether RDF and SPARQL can feel “native” in a programming language. If you’ve ever thought “why is RDF integration so clunky?”, Fifth might be interesting to try. I’m producing the language for my own satisfaction, but I would really love to know if you find it useful.

Get Involved

  • The project is open-source: GitHub repo
  • You can clone, build, and run simple programs today.
  • Contributions, bug reports, and feature suggestions are VERY welcome.
  • Even just trying it out and sharing what works—or doesn’t—would be valuable.

Closing Thoughts

Fifth is an experiment, but it’s already usable. If you’re curious about compilers, semantic web tech, or enjoy tinkering with new languages, please take a look. Feedback, ideas, and constructive criticism are all appreciated.