Top
Best
New

Posted by ingve 12/21/2025

Rue: Higher level than Rust, lower level than Go(rue-lang.dev)
Related: https://steveklabnik.com/writing/thirteen-years-of-rust-and-...
257 points | 269 commentspage 2
coffeeaddict1 12/21/2025|
How does this differ from Hylo [0]?

[0] https://hylo-lang.org

steveklabnik 12/21/2025|
I am very interested in Hylo! I think they're playing in similar spaces. I'd like to explore mutable value semantics for Rue.

One huge difference is that Hylo is using LLVM, whereas I'm implementing my own backends. Another is that Hylo seems to know what they want to do with concurrency, whereas I really do not at all right now.

I think Hylo takes a lot of inspiration from Swift, whereas I take more inspiration from Rust. Swift and Rust are already very similar. So maybe Hylo and Rue will end up like this: sister languages. Or maybe they'll end up differently. I'm not sure! I'm just playing around right now.

fuzztester 12/22/2025||
How are Swift and Rust very similar? I can search, but want to hear your opinion.

And congrats on starting a language project, even if Just for Fun (Linux). ;)

https://frappe.io/blog/book-reviews/just-for-fun-a-book-on-l...

steveklabnik 12/22/2025||
Thanks :)

Both are playing around in similar spaces, both shared team members for a while, both have a take an automatic memory management that isn’t a garbage collector, both were sponsored by a primary company for a while (Swift still is, I think). There’s a lot of differences too.

PrimalPower 12/22/2025||
I don't need lower level than go. I just really like Rust' type system and error handling and I want it in a compiled language.

Zero Cost abstractions and it's memory model is fascinating - but isn't particularly useful for the part of the tech stack I work on.

trueno 12/22/2025|
i see a lot of go hatred on HN but coming from c i actually kind of love go when i need just enough abstracted away from me to focus on doing a thing efficiently and still end up with a well-enough performing binary. i have always been obsessed with the possibility of building something that doesn't need me to install runtimes on the target i want to run it, it's just something that makes me happy. very rarely do i need to go lower than what go provides and when i do i just.. dip into c where i earned a lot of my stripes over the years.

rust is cool. a lot of really cool software im finding these days is written in rust these days & i know im missing some kind of proverbial boat here. but rusts syntax breaks my brain and makes it eject completely. it's just enough to feel like it requires paradigm shifts for me, and while others are really good at hopping between many languages it's just a massive weakness of mine. i just cant quite figure out the ergonomics of rust so that it feels comfy, my brain seems to process everything through a c-lens and this is just a flaw of mine that makes me weak in software.

golang was started by some really notable brains who had lots of time in the game and a lot of well thought out philosophies of what could be done differently and why they should do it differently coming from c. there was almost a socio-economic reason for the creation of go - provide a lang that people could easily get going in and become marketable contributors that would help their career prospects. and i think it meets that mark, i was able to get my jr engineers having fun in golang in no time at all & that's panned out to be a huge capability we added to what our team can offer.

i like the objective of rue here. reviewing the specification it actually looks like something my brain doesn't have any qualms with. but i dont know what takes a language from a proposal by one guy and amplifies it into something thats widely used with a great ecosystem. other minds joining to contribute & flesh out standard libraries, foundations backing, lots of evangelism. lots of time. i won't write any of those possibilities off right now, hopefully if it does something right here there's a bright future for it. sometimes convincing people to try a new stack is like asking them to cede their windows operating system and try out linux or mac. we've watched a lot of languages come and go, we watch a lot of languages still try to punch thru their ceilings of general acceptance. unlike some i dont really have huge tribalistic convictions of winners in software, i like having options. i think it's pretty damn neat that folks are using their experiences with other languages to come up with strong-enough opinions of how a language should look and behave and then.. going out and building it.

est31 12/22/2025||
I have mostly been writing Rust in the last 10 years, but recently (1 year) I have been writing Go as well as Rust.

The typical Go story is to use a bunch of auto generation, so a small change quickly blows up as all of the auto generate code is checked into git. Like easily a 20x blowup.

Rust on the other hand probably does much more such code generation (build.rs for stuff like bindgen, macros for stuff like serde, and monomorphized generics for basically everything). But all of this code is never checked into git (with the exception of some build.rs tools which can be configured to run as commands as well), or at least 99% of the time it's not.

This difference has impact on the developer story. In go land, you need to manually invoke the auto generator and it's easy to forget until CI reminds you. The auto generator is usually quite slow, and probably has much less caching smartness than the Rust people have figured out.

In Rust land, the auto generation can, worst case, run at every build, best case the many cache systems take care of it (cargo level, rustc level). But still, everyone who does a git pull has to re-run this, while with the auto generation one can theoretically only have the folks run it who actually made changes that changed the auto generated code, everyone else gets it via git pull.

So in Go, your IDE is ready to go immediately after git pull and doesn't have to compile a tree of hundreds of dependencies. Go IDEs and compilers are so fast, it's almost like cheating from Rust POV. Rust IDEs are not as fast at all even if everything is cached, and in the worst case you have to wait a long long time.

On the other hand, these auto generation tools in Go are only somewhat standardized, you don't have a central tool that takes care of things (or at least I'm not aware of it). In Rust land, cargo creates some level of standardization.

You can always look at the auto generated Go code and understand it, while Rust's auto generated code usually is not IDE inspectable and needs special tools for access (except for the build.rs generated stuff which is usually put inside the target directory).

I wonder how a language that is designed from scratch would approach auto generation.

mxey 12/22/2025||
> On the other hand, these auto generation tools in Go are only somewhat standardized, you don't have a central tool that takes care of things (or at least I'm not aware of it).

https://pkg.go.dev/cmd/go#hdr-Generate_Go_files_by_processin...

Kinrany 12/22/2025|||
FYI rust-analyzer can show expanded macros. It's not perfect because you only get syntax highlighting, but it works.
steveklabnik 12/22/2025|||
Yeah, this is a hard problem, and you're right that both have upsides and downsides. Metaprogramming isn't easy!

I know I don't want to have macros if I can avoid them, but I also don't forsee making code generation a-la-Go a first class thing. I'll figure it out.

beautron 12/22/2025|||
> The typical Go story is to use a bunch of auto generation, so a small change quickly blows up as all of the auto generate code is checked into git. Like easily a 20x blowup.

Why do you think the typical Go story is to use a bunch of auto generation? This does not match my experience with the language at all. Most Go projects I've worked on, or looked at, have used little or no code generation.

I'm sure there are projects out there with a "bunch" of it, but I don't think they are "typical".

GeneralMayhem 12/22/2025|||
Same here. I've worked on one project that used code generation to implement a DSL, but that would have been the same in any implementation language, it was basically transpiring. And protobufs, of course, but again, that's true in all languages.

The only thing I can think of that Go uses a lot of generation for that other languages have other solutions for is mocks. But in many languages the solution is "write the mocks by hand", so that's hardly fair.

tgv 12/22/2025||||
Me neither. My go code doesn't have any auto-generation. IMO it should be used sparingly, in cases where you need a practically different language for expressivity and correctness, such as a parser-generator.
lenkite 12/22/2025|||
Anything and everything related to Kubernetes in Go uses code generation. It is overwhelmingly "typical" to the point of extreme eye-rolling when you need to issue "make generate" three dozen times a day for any medium sized PR that deals with k8s types.
ryanobjc 12/22/2025|||
The "just generate go code automatically then check it in" is a massive miswart from the language, and makes perfect sense because that pathological pattern is central to how google3 works.

A ton of google3 is generated, like output from javascript compilers, protobuf serialization/deserialization code, python/C++ wrappers, etc.

So its an established Google standard, which has tons of help from their CI/CD systems.

For everyone else, keeping checked-in auto-generated code is a continuous toil and maintenance burden. The Google go developers don't see it that way of course, because they are biased due to their google3 experience. Ditto monorepos. Ditto centralized package authorities for even private modules (my least fave feature of Go).

mxey 12/22/2025||
> For everyone else, keeping checked-in auto-generated code is a continuous toil and maintenance burden. The Google go developers don't see it that way of course, because they are biased due to their google3 experience.

The golang/go repo itself has various checked-in generated repo

auggierose 12/22/2025||
Auto generation? If you need to use that a lot, then the programming language is defective, I would say.
9rx 12/22/2025||
When Go was launched, it was said it was built specifically for building network services. More often than not that means using protobuf, and as such protobuf generated code ends up being a significant part of your application. You'd have that problem in any language, theoretically, due to the design of protobuf's ecosystem.

Difference is that other languages are built for things other than network services, so protobuf is much less likely to be a necessary dependency for their codebases.

nasretdinov 12/22/2025|||
What I've found over the years is that protobuf is actually not that widespread, and, given that, if you ignore gogoprotobuf package, it would generate terrible (for Go's GC) structs with pointers for every field, it's not been terribly popular in Go community either, despite both originating at Google
auggierose 12/22/2025|||
I'd say auto generation is just another instance of Greenspun's tenth rule.
dpflan 12/22/2025||
Just pointing out here that "rue" is used to express "to regret", emphatically. Perhaps it is not the best name for a programming language.
steveklabnik 12/22/2025||
That’s part of the reason for the name! “Rust” also has negative interpretations as well. A “rue” is also a kind of flower, and a “rust” is a kind of fungus.
dpflan 12/22/2025||
Fair enough! I do like how others are framing this is as "write less code" -- if Rue makes one think more and more about the code that finally makes it to the production, that can be a real win.
embedding-shape 12/22/2025|||
Sounds fitting to me. Every line of code I wrote that ultimately didn't need code to begin with, is basically codified regrets checked into git.
9rx 12/22/2025||
The best code is the code not written, so perhaps it is the best name for a programming language?
reactordev 12/22/2025||
I write a lot of go. I tried to write a lot of rust but fell into lifetime traps. I really want to leave C++ but I just can’t without something that’s also object oriented.

Not a dig at functional, it’s just my big codebases are logically defined as objects and systems that don’t lend itself to just being a struct or an interface.

Inheritance is why I’m stuck in C++ land.

I would love to have something like rust but that supports classes, virtual methods, etc. but I guess I’ll keep waiting.

scuff3d 12/22/2025||
In Rust you can have structs with any number of methods defined on them, which is functionally not that different from a class. You get interface like behavior with traitsz and you get encapsulation with private/public data and methods.

Does inheritance really matter that much?

reactordev 12/22/2025||
Yes it does. Unless I can attach a trait to a struct without having to define all the methods of that trait for that struct. This is my issue with interfaces and go. I can totally separate out objects as interfaces but then I have to implement each implementation’s interface methods and it’s a serious chore when they’re always the same.

For example: Playable could be a trait that plays a sound when you interact with it. I would need to implement func interact for each object. Piano, jukebox, doorbell, etc. With inheritance, I write it once, add it to my class, and now all instances of that object have interact. Can I add instance variables to a trait?

This saves me time and keeps Claude out of my code. Otherwise I ask Claude to implement them all, modify them all, to try to keep them all logically the same.

I also don’t want to go type soup in order to abstract this into something workable.

scuff3d 12/22/2025||
You can provide default method implementations for traits. Any type with that trait gets the default behavior, unless you override it.
reactordev 12/22/2025||
But that trait can’t have fields
scuff3d 12/22/2025||
You can use a struct that the other structs have as a field. The trait can then operate on that struct.

I'm not trying to convince you to use Rust. If you prefer C++ have at it. I was just trying to point out that most patterns in C++ have a fairly close analogy in Rust, just with different tradeoffs.

reactordev 12/22/2025||
Yeah go has embedded structs. It’s ugly and allows one to address the fields on the parent and it exposes the struct (with the same fields) so it’s kind of a head scratcher.

To be honest, it’s been 3 years since I looked at rust and I might try again. I still prefer inheritance because some things just are-a thing. I also love ECS and components and see traits as that. I just wish I could store local state in those.

scuff3d 12/22/2025||
You can store state in the struct and then define a method in the trait to return the struct. Then all your default methods can use the "getter" to access the struct and it's state. The only thing you have to do is embed the struct and implement that one "getter" method to return it. I don't think it's much more boilerplate then utilizing inheritance.

Fyrox, a game engine written in Rust, uses an ECS and several object oriented patterns in their design. Might be a good reference if your interested. The rust book also has a section on OOP patterns in Rust.

I think it's Fyrox anyway. I remember the creator of a Rust game engine talking about it in an interview on Developer Voices. It could have been Bevy I guess, but I don't think so.

reactordev 12/22/2025||
Yeah that’s what I did and it’s ugly. It works, and allows me to attach multiple behaviors but I would have to initialize them and write that boilerplate code to return them.

I think I might be able to do it with a macro but I’m not a rust guy so I’m limited by my knowledge.

steveklabnik 12/22/2025|||
I respect your preferences, but I am unlikely to add this sort of OOP. Ideally there'll be no subtyping at all in Rue. So you'll have to keep waiting, I'm afraid. Thanks for checking it out regardless!
amluto 12/22/2025|||
As a long time C++ user, I’m curious why you like inheritance and virtual methods so much.

I maintain a medium sized, old-ish C++ code base. It uses classes and inheritance and virtual methods and even some multiple inheritance. I despise this stuff. Single Inheritance is great until you discover that you have a thing that doesn’t slot nicely into the hierarchy or when you realize that you want to decompose an interface (cough, base class) into a couple of non-hierarchically related things. Multiple inheritance is an absolute mess unless you strictly use base classes with pure virtual methods and no member variables. And forcing everything into an “is a” relationship instead of a “has a” relationship can be messy sometimes.

I often wish C++ had traits / or Haskell style type classes.

chuckadams 12/22/2025|||
Protected and private inheritance are C++'s equivalent to traits, and they don't suffer from the usual issues of multiple inheritance. As for type classes, check out concepts. By no means am I trying to sell C++, I don't touch it myself, but it doesn't leave you completely adrift in those seas.
amluto 12/23/2025||
> Protected and private inheritance are C++'s equivalent to traits

How so? Maybe in a COM-like world where the user of an object needs to call a method to get an interface pointer.

I’ll grant that concepts are a massive improvement.

chuckadams 12/23/2025||
In the sense of supporting mixins that don't necessarily pollute your public API. The overlap with other languages isn't perfect, and traits in the stdlib refer to a rather different template-based thing, but I don't think any language has the monopoly on a canon definition of traits. Certainly they're going to be different than traits in Self, which iirc coined the term.
xpe 12/22/2025|||
Ah, yes, multiple inheritance in C++: where order matters but sanity does not
culebron21 12/22/2025||
Usually it takes some time to get used to borrow checker and lifetimes. After that, you stop noticing them.
pjmlp 12/22/2025||
If this language is supposed to be used for systems programming, doing a factorial isn't really a selling example of why Rue.
steveklabnik 12/22/2025|
For sure. It's just such early days I don't have a lot of stuff that's useful yet. I'll get there.
yoan9224 12/22/2025||
The positioning is interesting - claiming Rust's performance with Go's simplicity is basically every new systems language's promise since 2015. The key differentiator seems to be "zero-cost exceptions" which I assume means compile-time Result types without runtime unwinding overhead? That's compelling if true, since Rust's Result ergonomics can get verbose in deeply nested error chains.

But the real test is compile times and cognitive overhead. Rust's borrow checker is theoretically elegant but practically brutal when you're learning or debugging. If Rue can achieve memory safety without lifetime annotations everywhere, that's genuinely valuable. However, I'm skeptical - you can't eliminate tradeoffs, only move them around. If there's no borrow checker, what prevents use-after-free? If there's garbage collection, why claim "lower level than Go"?

The other critical factor is ecosystem maturity. Rust's pain is partially justified by its incredible crate ecosystem - tokio, serde, axum, etc. A new language needs either (1) seamless C FFI to bootstrap libraries, (2) a killer feature so valuable that people rewrite everything, or (3) 5+ years for the ecosystem to develop. Which path is Rue taking?

I'd love to see real-world benchmarks on: compile time for a 50k line project, memory usage of a long-running web server compared to Rust/Go, and cold start latency for CLI tools. Those metrics matter more than theoretical performance claims. The "fun to write" claim is subjective but important - if it's genuinely more ergonomic than Rust without sacrificing performance, that could attract the "Python developers wanting systems programming" demographic.

steveklabnik 12/22/2025||
I’m explicitly not claiming Rust’s performance. Rust will always be ahead here. I’m giving up some of that performance for other things.

I do agree that those benchmarks are important. Once I have enough language features to make such a thing meaningful, I’ll be tracking them.

Where did I write that it’s fun to write?

whimsicalism 12/22/2025||
Your style of commenting is pretty full of LLM tells fyi. Normally don’t comment on it but this is the second such comment of yours I have read in a few minutes.

e: I would be curious of the thoughts of those downvoting as personally I don’t think mostly LLM written comments are a direction we want to move towards on HN.

Hemospectrum 12/22/2025|||
Rather than downvoting you, I will speak up to say I don't see what you're seeing. Spaces around hyphens, yeah, sure, but LLMs prefer em dashes, and even that is unreliable, because it's borrowed from habits that real humans have had for many years.

For me, the more important indicator is the content. I see reports of personal experience, and thoughts that are not completely explained (because the reader is expected to draw the rest of the owl). I don't see smugly over-the-top piles of adjectives filling in for an inability to make critiques of any substance. I don't see wacky asides amounting to argumentum ad lapidem, accomplishing nothing beyond insulting readers who disagree with a baseless assertion.

I think it's likely you have drawn a false positive.

whimsicalism 12/22/2025||
It saddens me a bit that this can't be distinguished by people on here. I encourage you to take a look at their profile and see if you are still as skeptical. Noticing em-dashes is facile and as you mention, common among human written text - but there are more subtle stylistic cues (although now that you mention it, this writer likely went out of their way to replace emdashes with hyphens).

I was raised in a family of professional writer-editors (but now am the tech-y black sheep) which might make the cues a bit more obvious to me. The degree to which this style of writing was common prior to 2022 is vastly overstated, the tells were actually not really that common.

dkdcio 12/22/2025|||
A) you cannot tell B) you have said nothing productive toward discussion, you’ve just accused someone of using a tool (that you don’t know if they used)

I’d prefer actual criticism of the content. (I cannot downvote and would not if I could)

whimsicalism 12/22/2025||
I am certain that they used a tool. As I said, I normally do not complain and typically engage on the merits -- but these have been among the top comments on every front page article I've read today and it gets tiresome! To me, if you cannot invest enough effort to remove the pretty obvious cues, why am I investing the effort in reading the comment?

After seeing your reply, I looked at their comment history which makes it even more obvious imo.

dkdcio 12/22/2025||
that is fair —- you’re claiming this person has a pattern of lazy, low-effort comments. I didn’t check and if you’re right, I appreciate you calling it out

just as you’re annoyed by low-effort LLM posts/comments, I’m annoyed by low-effort “this sounds like it was written by ChatGPT” comments (hence my response and at least a possible explanation of downvotes)

edit: I also scrolled through, you’re absolutely right! it does look like a low-effort bot

waldrews 12/22/2025||
What the world needs is a more expressive language than Go, that interops with Go's compilation model and libraries.
rubenvanwyk 12/22/2025||
Something like Borgo https://borgo-lang.github.io/
jandy 12/22/2025||
Sadly, seems to be abandoned. Last commit a year ago.
pjmlp 12/22/2025||
Nah, we already have that in D, C#, and who knows maybe one day Java finally gets Valhala, or one can use Kotlin or Scala in the meantime.
waldrews 12/23/2025||
It's amazing how often C# (or more broadly CLR/JVM) is the pragmatic answer, even when you feel uncool using it.
pjmlp 12/23/2025||
Indeed. :)
misir 12/22/2025|
Any plans for adding algebraic data types (aka rust enums)?
steveklabnik 12/22/2025|
I landed non-generic enums this evening. I'm not 100% sure what abstraction paths I want to go down. But I see sum types as just as important as product types, for sure.
More comments...