Lisette a little language inspired by Rust that compiles to Go (lisette.run)

by jspdown 154 comments 271 points
Read article View on HN

154 comments

[−] thomashabets2 40d ago
I've chatted a bit with the author, but not actually tried the language. It looks very interesting, and a clear improvement. I'm not particularly quiet about not liking Go[1].

I do think there may be a limit to how far it can be improved, though. Like typed nil means that a variable of an interface type (say coming from pure Go code) should enter Lisette as Option>. Sure, one can match on Some(Some(h)) to not require two unwrapping steps, but it becomes a bit awkward anyway. (note: this double-Option is not a thing in Lisette at least as of now)

Lisette also doesn't remove the need to call defer (as opposed to RAII) in the very awkward way Go does. E.g. de facto requiring that you double-close on any file opened for write.

Typescript helps write javascript, but that's because until WASM there was no other language option to actually run in the browser. So even typescript would be a harder sell now that WASM can do it. Basically, why try to make Go more like Rust when Rust is right there? And fair enough, the author may be aiming for somewhere in between. And then there's the issue of existing codebases; not everything is greenfield.

So this seems best suited for existing Go codebases, or when one (for some reason) wants to use the Go runtime (which sure, it's at least nicer than the Java runtime), but with a better language. And it does look like a better language.

So I guess what's not obvious to me (and I mentioned this to the author) is what's the quick start guide to having the next file be in Lisette and not Go. I don't think this is a flaw, but just a matter of filling in some blanks.

[1] https://blog.habets.se/2025/07/Go-is-still-not-good.html

[−] baranul 40d ago
There are several languages that compile to Go, trying to be a better a Go. Off the top of my head: XGo (https://github.com/goplus), Borgo (https://github.com/borgo-lang/borgo), Soppo (https://github.com/halcyonnouveau/soppo)...
[−] emanuele-em 40d ago
Really nice work on this. The error messages alone show a lot of care, the "help" hints feel genuinely useful, not just compiler noise.

I'm curious about the compiled Go output though. The Result desugaring gets pretty verbose, which is totally fine for generated code, but when something breaks at runtime you're probably reading Go, not Lisette. Does the LSP handle mapping errors back to source positions?

Also wondering about calling Lisette from existing Go code (not just the other direction). That feels like the hard part for adoption in a mixed codebase.

Is the goal here to eventually be production-ready or is it more of a language design exploration? Either way it's a cool project.

[−] virtualritz 40d ago
Looks great.

But I can't help wondering:

If it is similar to Rust why not make it the the same as Rust where it feature-matches?

Why import "foo.bar" instead of use foo::bar?

Why Bar.Baz => instead of Bar::Baz =>? What are you achieving here?

Why make it subtlety different so someone who knows Rust has to learn yet another language?

And someone who doesn't know Rust learns a language that is different enough that the knowledge doesn't transfer to writing Rust 1:1/naturally?

Also: int but float64?

Edit: typos

[−] phplovesong 40d ago
Go has an awesome runtime, but at the same time has a very limited typesystem, and is missing features like exhaustive pattern matching, adts and uninitted values in structs.

Lisette brings you the best of both worlds.

[−] osigurdson 40d ago
I'd always liked the Go runtime but the language is pretty clunky imo and I don't think they will ever improve it (because they don't think anything is wrong with it). However, you have to really dislike the language to use a transpiler.
[−] Defletter 40d ago
Something that I don't understand about Rust, or these rustylangs, is the insistence of separating structs and methods. Don't get me wrong, I like named-impl blocks, but why are they the only option? Why can't I put an unnamed-impl block inside the struct? Or better yet just define methods on the struct? What's the point of this and why do these rustylangs never seem to change this?
[−] lucianmarin 40d ago
A programming language similar to Python that compiles to Rust or Go will be amazing.
[−] rattray 40d ago
This seems awesome. Seems to address many of my armchair complaints about both Go (inexpensive) and Rust (bloated/complex).

I'm curious what compilation times are like? Are there theoretical reasons it'd be order of magnitude slower than Go? I assume it does much less than the rust compiler...

Relatedly, I'd be curious to see some of the things from Rust this doesn't include, ideally in the docs. Eg I assume borrow checking, various data types, maybe async etc are intentionally omitted?

[−] bhwoo48 40d ago
Love the idea of bringing Rust ergonomics to the Go runtime. As someone currently building infra-automation tools (Dockit), the trade-off between Rust's safety and Go's simplicity is always a hot topic. This project addresses it in a very cool way. Will definitely follow the development
[−] melodyogonna 40d ago
I'm wondering about the logistics of making this integrate with Go at the assembly/object file level rather than at source code level. What if it compiled to Go's assembly rather than to Go source code
[−] sail0rm00n 40d ago
I’m sold just for proper enumeration support.
[−] n_u 40d ago
This is really cool! Go is so dead simple to learn but it just lacks a few features. I feel this really fills that specific gap.

Go with more expressive types and a bit stricter compiler to prevent footguns would be a killer backend language. Similar to what TypeScript was to JavaScript.

My 2 cents would be to make it work well with TypeScript frontends. I think TypeScript is so popular in backends because 1. you can share types between frontend code and backend code and 2. it's easy for frontend devs to make changes to backend code.

[−] darkest_ruby 40d ago
This is what go should have been, instead of a mess it is today