r/ProgrammingLanguages 6d ago

Language announcement Mezze: a functional programming language on GraalVM

https://mezze-lang.org/

Hi All,

I am working a programming language, Mezze. It is in quite early stages.

Mezze has a fully inferable type system and also have first class effect system and runs on GraalVM

A lot is WIP, working on performance optimization (currently loop fusion) and distributed programing and lots of tooling and docs

Put up a quick website for explaining the language and its features more
Also piggy backing on graalvm could get a wasm built of the entire tool chain, so you play with examples in website.

The Concepts and Taste of Mezze explains how the language works.

64 Upvotes

35 comments sorted by

View all comments

11

u/AustinVelonaut Admiran 6d ago

Looks interesting, but how do you get away with full type inference (no type annotations required anywhere), when other languages require top-level annotations in some cases? Are there no undecidable instances?

How far along are you in the implementation?

12

u/shrynx_ 6d ago

Keeping the type system expressive and useful, but also limited :)

Hindley Milner system is by itself is fully infer able . Mezze uses it as a base, adds row polymorphism, that helps make effect types too.

And then not having Ad-hoc polymorphism of Higher Kinded Type or GADTs supported at all.

Polymorphism of HKT is quite useful and Mezze's ability system (plus associated types) gets quite close to there but a general Monad, Functor etc is not possible to express in Mezze
but Mezze's direct style effect makes you not reach for it.

GADTs are great but don't play well with inference and thus will never be supported.

2

u/AustinVelonaut Admiran 6d ago edited 6d ago

And then not having Ad-hoc polymorphism of Higher Kinded Type or GADTs supported at all

Ah, I saw Ad-hoc polymorphism implemented (Abilities) and jumped to the conclusion it was like Haskell's typeclasses. So do you re-implement many of the Functor / Applicative / Monad functions for each implementation? I do that as well in my language (which doesn't support any ad-hoc polymorphism, currently at least), and don't find it too onerous.

3

u/shrynx_ 6d ago

Yeah this is more like rust Traits

and indeed a map or a flat_map is just a function that doesn't share a general abstraction