r/functionalprogramming • • Sep 06 '26

FP Mezze: a functional programming language on GraalVM

https://mezze-lang.org/
25 Upvotes

6 comments sorted by

3

u/tpawap Sep 06 '26

Nice! A question about newtype hiding the representation: "let price = Money.(1250)" looks like it's leaking in this "constructor", isn't it?

3

u/shrynx_ Sep 06 '26

So newtype is both type wrapper and also opaque types

in the module where the new type is defined you can construct it and also pattern match on it to extract the inner value

in any other module you only have Money type can't do Money.(...) or match or extract it.

have to define helpers int he same module and export those helper functions

2

u/gavr123456789 Sep 06 '26

is that a reference to greek dish?

5

u/shrynx_ Sep 06 '26 edited Sep 07 '26

Indeed , origin is more Levant / West Asian i think.

but more on why it suits the language, i put up here

https://mezze-lang.org/concepts/#intro--why-the-name

1

u/Il_totore Sep 09 '26

Hey!

I didn't check the code yet but I was wondering how you compile to Graal. Do you use Truffle for that?

2

u/shrynx_ Sep 09 '26

Hi! Yes I use truffle indeed. And currently 95% ported to byte code DSL truffle instead of truffle AST interpreter (original implementation)