Devlog - Fanak - 1 Devlog - Fanak - 1

Devlog - Fanak - 1

This devlog has a lot in common with my talk at BMU event (first ever blue meetup 🚀🔥)

The name

Let’s start with this, A fanak is a small fox that lives in Northern African deserts.

Fanak Fox

it’s incorrectly written in English as fennec but the correct way to write it according to the Arabic word is Fanak.

The language

In recent years I started to appreciate functional programming a lot more, so it was natural for Fanak to be a functional language with features like:

  • Immutability
  • Algebraic data types
  • Pattern matching
  • Typeclasses

and doing all of this while being fast & performant.

Although fanak is marketed as a functional language, it’s intended to be multi-paradigm. So it doesn’t take a very strict approach for some concepts.

The syntax

Now this will be a bit of a controversial topic, but I really don’t like the Haskell syntax of writing functions without braces

foo x bar y --is this foo(x, bar(y)) or foo(x, bar, y)

now I know the rules of function associativity in Haskell, but I still think C-family languages have the upper hand in syntax.

Where will it run?

There are multiple options for a compiler backend:

  • JVM
  • BEAM (Erlang Abstract Machine)
  • LLVM
  • .NET runtime

but since I was most comfortable with C# and .NET runtime in general I choose to write the compiler in C# (with some plans to write it in Fanak in the future).

Wait, where is the rest

This is just a very small introduction to fanak and why I created it, and the design decisions about it.

I went into a lot more detail in my talk at BMU (first ever meetup by BLEU)

(Inserting unapologetic self promotion)


← Back to blogs