[HN Gopher] Rue: Higher level than Rust, lower level than Go
       ___________________________________________________________________
        
       Rue: Higher level than Rust, lower level than Go
        
       Author : ingve
       Score  : 25 points
       Date   : 2025-12-21 20:46 UTC (2 hours ago)
        
 (HTM) web link (rue-lang.dev)
 (TXT) w3m dump (rue-lang.dev)
        
       | andsoitis wrote:
       | > Memory Safe
       | 
       | > No garbage collector, no manual memory management. A work in
       | progress, though.
       | 
       | I couldn't find an explanation in the docs or elsewhere _how_ Rue
       | approaches this.
       | 
       | If not GC, is it via:
       | 
       | a) ARC
       | 
       | b) Ownership (ala Rust)
       | 
       | c) some other way?
        
         | steveklabnik wrote:
         | I am playing around with this! I'm mostly interested in
         | something in the space of linear types + mutable value
         | semantics.
        
           | echelon wrote:
           | Nice! I see you're one of (if not the primary) contributor!
           | 
           | Do you see this as a prototype language, or as something that
           | might evolve into something production grade? What space do
           | you see it fitting into, if so?
           | 
           | You've been such a huge presence in the Rust space. What
           | lessons do you think Rue will take, and where will it depart?
           | 
           | I see compile times as a feature - that's certainly nice to
           | see.
        
             | steveklabnik wrote:
             | This is a project between me and Claude, so yeah :)
             | 
             | It's a fun project for me right now. I want to just explore
             | compiler writing. I'm not 100% sure where it will lead, and
             | if anyone will care or not where it ends up. But it's
             | primarily for me.
             | 
             | I've described it as "higher than Rust, lower than Go"
             | because I don't want this to be a GC'd language, but I want
             | to focus on ergonomics and compile times. A lot of Rust's
             | design is about being competitive with C and C++, I think
             | by giving up that ultra-performance oriented space, I can
             | make a language that's significantly simpler, but still
             | plenty fast and nice to use.
             | 
             | We'll see.
        
           | oulipo2 wrote:
           | So linear type + mutable value would be quite close to Rust,
           | right?
        
             | steveklabnik wrote:
             | Rust has affine types, not linear. It also doesn't have
             | mutable value semantics, it uses references, lifetimes, and
             | borrowing.
        
       | jameskilton wrote:
       | Probably best to link to the repo itself, this is not meant to be
       | used yet. https://github.com/rue-language/rue
        
       | killingtime74 wrote:
       | I always thought of Go as low level and Rust as high level. Go
       | has a lot of verbosity as a "better C" with GC. Rust has low
       | level control but many functional inspired abstractions. Just try
       | writing iteration or error handling in either one to see.
        
         | steveklabnik wrote:
         | Rue author here, yeah I'm not the hugest fan of "low level vs
         | high level" framing myself, because there are multiple valid
         | ways of interpreting it. As you yourself demonstrate!
         | 
         | As some of the larger design decisions come into place, I'll
         | find a better way of describing it. Mostly, I am not really
         | trying to compete with C/C++/Rust on speed, but I'm not going
         | to add a GC either. So I'm somewhere in there.
        
           | written-beyond wrote:
           | How very so humble of you to not mention being one of the
           | primary authors behind TRPL book. Steve you're a gem to the
           | world of computing. Always considered you the J. Kenji of the
           | Rust world. Seems like a great project let's see where it
           | goes!
        
             | steveklabnik wrote:
             | That is a very kind thing to say, I admire him quite a bit.
             | Thank you!
        
         | batisteo wrote:
         | C was designed as a high level language and stayed so for
         | decades
        
       | norir wrote:
       | I wince every time I see naive recursive fibonacci as a code
       | example. It is a major turnoff because it hints at a lack of
       | experience with tail call optimization, which I consider a must
       | have for a serious language.
        
         | stouset wrote:
         | Would someone please explain to me why TCO--seemingly alone
         | amongst the gajillions of optimization passes performed by
         | modern compilers--is so singularly important to some people?
        
           | aaronblohowiak wrote:
           | functional programming background / SICP ?
        
           | Rusky wrote:
           | TCO is less of an optimization (which are typically best-
           | effort on the part of the compiler) and more of an actual
           | semantic change that expands the set of valid programs. It's
           | like a new control flow construct that lives alongside
           | `while` loops.
        
           | oersted wrote:
           | For people that like functional style and using recursion for
           | everything, TCO is a must. Otherwise there's no way around
           | imperative loops if you want decent performance and not
           | having to worry about the stack limit.
           | 
           | Perhaps calling it an "optimization" is misleading. Certainly
           | it makes code faster, but more importantly it's syntax sugar
           | to translate recursion into loops.
        
         | steveklabnik wrote:
         | I only have basic constant folding yet in terms of
         | optimizations, but I'm very aware of TCO. I haven't decided if
         | I want to require an annotation to guarantee it like Rust is
         | going to.
        
       | oulipo2 wrote:
       | Interesting, for me the "between Rust and Go" would be a nice fit
       | for Swift or Zig. I've always quite liked the language design of
       | Swift, it's bad that it didn't really take off that much
        
         | steveklabnik wrote:
         | One thing working on this project has already done is give me
         | more appreciation for a lot of Zig's design.
         | 
         | Zig really aims to be great at things I don't imagine Rue being
         | useful for, though. But there's lots of good stuff there.
         | 
         | And lots of respect to Swift as well, it and Hylo are also
         | major inspiration for me here.
        
       ___________________________________________________________________
       (page generated 2025-12-21 23:00 UTC)