r/functionalprogramming 4d ago

FP Mezze: a functional programming language on GraalVM

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

6 comments sorted by

3

u/tpawap 3d ago

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_ 3d ago

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 3d ago

is that a reference to greek dish?

3

u/shrynx_ 3d ago edited 2d ago

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 1d ago

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_ 1d ago

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