Live data from Hacker News

Lisette a little language inspired by Rust that compiles to Go

lisette.run

141–150 of 168 posts

Re: Lisette a little language inspired by Rust that compiles to Go

#141

Earlier quoted context omitted.

You can enable null safety in TypeScript, seems like a pretty good fix to me.

Its mediocre at best. Like in maths, how would i feel if addition would sometime actully be division. Thats hiw bad it is.

Well, isn’t division just substractive addition?

Re: Lisette a little language inspired by Rust that compiles to Go

#142

Earlier quoted context omitted.

Does Go actually have an async story? I know that question risks starting a semantic debate, so let me be more specific. Go allows creating lightweight threads to the point where it's a good pattern to just spin off goroutines left and right to your heart's content. That's more of a concurrency primitive than async. Sure, you combine it with a channel, and you've created an async future. The explicit passing of conte…

Go's async story is great, as there is no function coloring at all. That being said, I don't like Go's syntax very much. The runtime is great though.

To be fair, Go’s async story only works because there’s a prologue compiled into every single function that says “before I execute this function, should another goroutine run instead?” and you pay that cost on every function call. (Granted, that prologue is also used for other features like GC checks and stack size guards, but the point still stands.) Languages that aspire to having zero-cost abstractions can’t make that kind of decision, and so you get function coloring.

Re: Lisette a little language inspired by Rust that compiles to Go

#143

Earlier quoted context omitted.

Ditto. C# gets a bad rap due to its Windows-exclusive history, but it's now cross platform and has most of the features PL nerds are looking for. Strict nulls, pattern matching, a really mature and easy to use async ecosystem (it invented async/await), even a lot of the low level stuff is there (unsafe{} blocks ala rust and manual memory management where needed).

C# is nice, but it is nowhere near Rust in terms of safety or expressiveness. Thankfully they are finally adding discriminated unions (sum types) and other sorely missing features. Unsafe in C# is much more dangerous than unsafe in Rust, precisely because it doesn’t actually color a function. It just allows its body to use pointers. This is why you have methods in the CLR called “DangerousFoo()”, and the compiler doe…

Rust also has a much steeper learning curve. I can onboard an average developer that's familiar with Typescript and have them be productive in C# in a week.

This one is more subjective, but I also think C# has a more mature and painless web stack.

I love both languages but for me they each fill a different role.

Re: Lisette a little language inspired by Rust that compiles to Go

#144
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.

Re: Lisette a little language inspired by Rust that compiles to Go

#145

Earlier quoted context omitted.

No doubt a chatbot would be built faster if using a less strict language. It wasn't until I started working on larger Python codebases (written by good programmers) that I went "oh no, now I see how this is not an appropriate language". Similar to how even smaller problems are better suited for just writing a bash script. When you can have the whole program basically in your head, you don't need the guardrails that p…

I've also found that traversing a third-party codebase in Python is extremely frustrating and requires lots of manual work (with PyCharm) whereas with Rust, it's just 'Go to definition/implementation' every time from the IDE (RustRover). The strong typing is a huge plus when trying to understand code you didn't write (and I'm not talking LLM-generated).

sounds like a ide-noob theme song

Re: Lisette a little language inspired by Rust that compiles to Go

#146

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…

I switch between languages a lot and I'm currently learning PHP. I've found that syntax similarities can be a hazard. I see "function" and I think I'm writing JavaScript, but then I try to concatenate strings with "+" and I realize I'm actually writing PHP and need to use ".". These challenges are especially noticeable in the early days of learning.

Skip php, its a useless shitty lang to learn in 2026.

Re: Lisette a little language inspired by Rust that compiles to Go

#147
post #30

Go syntax and the Go runtime would be the perfect combo for me. Oh well... I love Rust for what it is, but for most of my projects, I can’t justify the added complexity. Sure, there are a bunch of things I miss from the Rust world when I’m working on large-scale distsys services in Go, but introducing Rust in that space would be a recipe for disaster. I guess the Go team knows that if they start adding everyone’s fav…

Are you a bot?

Re: Lisette a little language inspired by Rust that compiles to Go

#148

Earlier quoted context omitted.

MoonBit [0] is the best/future complete/active “rust with gc”. [0] https://www.moonbitlang.com

Did MoonBit add support for some kind of shared memory concurrency like threads? I remember discovering the language, being very excited about it, and then learning it is single-threaded, which makes it a poor replacement for Rust IMHO.

I believe it's not as much moonbit's limitation as wasm-gc limitation – shared gc structs will have to be supported at low level in wasm-gc first and I don't think there are any concrete proposals for it yet?

They support native target (as well as js target) but wasm one was always the primary one.

Having said that they have (cooperative) async for native target only currently.

Personally I'm looking forward for them to self host it – not sure why they're still holding to ocaml compiler, the language seems sufficient to have moonbit written in moonbit. Together with it I'm waiting for proper open source – currently what the team is doing is a bit like what Meta sometimes does – internal development, no community development, they just dump updates as snapshots from time to time instead of normal, fully open development.

I'm also clinging on my last intel purchase (macbook pro) and unfortunatelly they don't provide intel builds for macOS just arm ones (even though they do for linux), which is a bit of a pain – but I think I'll just buy arm macbook before they'll support intel on macOS (and maybe they'll never do, which is fair). It's a small thing from moonbit perspective, but annoying and limiting a bit for me personally to work remotely only with it.

Re: Lisette a little language inspired by Rust that compiles to Go

#149

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?

There are several reasons. 1. Struct fields are really important in Rust because of auto-traits. Your life as a Rust programmer is easier if all fields fit on the screen, because one of them may be the reason your struct is `!Sync` or whatever. 2. Impl blocks can have different generic bounds from the struct itself, which is a nice shorthand for repeating the same generic bounds for a series of related methods. So yo…

These don't seem like insurmountable challenges though. Unnamed impl blocks could work entirely within requirements. There could also be a lint to warn about any fields that are below trait definitions.

    struct Example {
        number: i32,
    }

    impl Example {
        fn boo() {
            println!("boo! Example::boo() was called!");
        }
    }

    trait Thingy {
        fn do_thingy(&self);
    }

    impl Thingy for Example {
        fn do_thingy(&self) {
            println!("doing a thing! also, number is {}!", self.number);
        }
    }
This could be expressed as:

    struct Example {
        number: i32,

        impl {
            fn boo() {
                println!("boo! Example::boo() was called!");
            }
        }

        impl Thingy {
            fn do_thingy(&self) {
                println!("doing a thing! also, number is {}!", self.number);
            }
        }
    }

    trait Thingy {
        fn do_thingy(&self);
    }
Keeping related things together is just infinitely more readable, in my opinion. In fact, the confusing nature of "impl " becoming "impl for " is obviated by internal impl blocks. Keeping them separate just seems so artificial, if not downright dogmatic.

Re: Lisette a little language inspired by Rust that compiles to Go

#150

Earlier quoted context omitted.

There are several reasons. 1. Struct fields are really important in Rust because of auto-traits. Your life as a Rust programmer is easier if all fields fit on the screen, because one of them may be the reason your struct is `!Sync` or whatever. 2. Impl blocks can have different generic bounds from the struct itself, which is a nice shorthand for repeating the same generic bounds for a series of related methods. So yo…

These don't seem like insurmountable challenges though. Unnamed impl blocks could work entirely within requirements. There could also be a lint to warn about any fields that are below trait definitions. struct Example { number: i32, } impl Example { fn boo() { println!("boo! Example::boo() was called!"); } } trait Thingy { fn do_thingy(&self); } impl Thingy for Example { fn do_thingy(&self) { println!("doing a thing!…

I mean, these are in the same file almost all the time anyway, and in that case all it gives you is an extra level of indentation. I don't think it's nicer at all.
Post reply on HN