# Sub\_pl: My first functionnal programming language using zig

**URL:** <https://ziggit.dev/t/sub-pl-my-first-functionnal-programming-language-using-zig/16146>\
**Category:** Showcase\
**Created:** [June 13, 2026, 4:40am UTC](https://ziggit.dev/t/sub-pl-my-first-functionnal-programming-language-using-zig/16146 "2026-06-13T04:40:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sublime12](https://ziggit.dev/user_avatar/ziggit.dev/sublime12/32/9112_2.png) [@Sublime12](https://ziggit.dev/u/Sublime12)\
**Post date:** [June 13, 2026, 4:40am UTC](https://ziggit.dev/t/sub-pl-my-first-functionnal-programming-language-using-zig/16146/1 "2026-06-13T04:40:09Z")

</div>

# [sub\_pl]: Writing my first programming language

* * *

> **[GitHub - Sublime12/sub\_pl: The math functional programming language](https://github.com/Sublime12/sub_pl)**
>
> The math functional programming language

I’m learning about compilers and interpreters, so i decided to create my own programming language from scratch, that means no llvm (or other backends), no lexing or parsing librairies.

This is the list of things i learn (and/or did) until now with this project:

- I implemented the lexer part of the language without allocating memory,
- Memory management is hard, so i used an arena allocator for my ast
- Designing my language seems as hard as implementing it
- There is no priority of operations, expressions are group left associatives except when explicitly set with parentheses. that means `p.x + 1 * 2` is parsed as `(((p.x) + 1) * 2)`, `1 + p.x * 2` is parsed as `(((1 + p).x) * 2)`,
- I print human readable errors when parsing failed instead of just doing asserts and print stack trace.

I’m really new to compilers/interpreters, so any suggestion is good.

This is my first post in community server, so my style of writing can be a little bit clunky.

Also one of my next projects is going to be create a programming language using this language (sub\_pl) to generate qbe ir.

### Supported Zig versions

- zig-0-15 (migrating soon to 16)

### AI / LLM usage disclosure

I did not use AI to write the code or readme. I’m just an humble neovim user 🙂

---

<div class="post-metadata">

**Author:** ![Kaeru](https://ziggit.dev/user_avatar/ziggit.dev/kaeru/32/3335_2.png) [@Kaeru](https://ziggit.dev/u/Kaeru)\
**Post date:** [June 13, 2026, 1:39pm UTC](https://ziggit.dev/t/sub-pl-my-first-functionnal-programming-language-using-zig/16146/2 "2026-06-13T13:39:16Z")

</div>

Congrats. If you haven’t read it yet I highly recommend the book Crafting Interpreters [https://craftinginterpreters.com/](https://craftinginterpreters.com/)

---

<div class="post-metadata">

**Author:** ![zmitchell](https://ziggit.dev/user_avatar/ziggit.dev/zmitchell/32/5377_2.png) [@zmitchell](https://ziggit.dev/u/zmitchell)\
**Post date:** [June 13, 2026, 4:02pm UTC](https://ziggit.dev/t/sub-pl-my-first-functionnal-programming-language-using-zig/16146/3 "2026-06-13T16:02:32Z")

</div>

+1 for Crafting Interpreters, I’m going through that book now
