Live data from Hacker News

Rue: Higher level than Rust, lower level than Go

rue-lang.dev

21–30 of 274 posts

Re: Rue: Higher level than Rust, lower level than Go

#21
post #19

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

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.

Re: Rue: Higher level than Rust, lower level than Go

#22

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.

C was designed as a high level language and stayed so for decades

Re: Rue: Higher level than Rust, lower level than Go

#23
post #20

Earlier quoted context omitted.

I am playing around with this! I'm mostly interested in something in the space of linear types + mutable value semantics.

So linear type + mutable value would be quite close to Rust, right?

Rust has affine types, not linear. It also doesn't have mutable value semantics, it uses references, lifetimes, and borrowing.

Re: Rue: Higher level than Rust, lower level than Go

#24
post #20

Earlier quoted context omitted.

So linear type + mutable value would be quite close to Rust, right?

Rust has affine types, not linear. It also doesn't have mutable value semantics, it uses references, lifetimes, and borrowing.

I've never seen any significant difference in linear vs affine types.

To me it just seems like Rust has Linear types, and the compiler just inserts some code to destroy your values for you if you don't do it yourself.

I guess the only difference is that linear types can _force_ you to manually consume a value (not necessarily via drop)? Is that what you are going for?

Re: Rue: Higher level than Rust, lower level than Go

#25

Earlier quoted context omitted.

Rust has affine types, not linear. It also doesn't have mutable value semantics, it uses references, lifetimes, and borrowing.

I've never seen any significant difference in linear vs affine types. To me it just seems like Rust has Linear types, and the compiler just inserts some code to destroy your values for you if you don't do it yourself. I guess the only difference is that linear types can _force_ you to manually consume a value (not necessarily via drop)? Is that what you are going for?

Affine types are "may use" and linear types are "must use," yeah. That is, linear types are stronger.

See https://faultlore.com/blah/linear-rust/ for a (now pretty old but still pretty relevant, I think) exploration into what linear types would mean for Rust.

Re: Rue: Higher level than Rust, lower level than Go

#27
post #8

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.

"Well you can judge the whole world on the sparkle that you think it lacks.

Yes, you can stare into the abyss, but it's staring right back"

Re: Rue: Higher level than Rust, lower level than Go

#28

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.

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.

Since it's framed as 'in between' Rust and Go, is it trying to target an intersection of both languages' use-cases?

Re: Rue: Higher level than Rust, lower level than Go

#29

How does this differ from Hylo [0]? [0] https://hylo-lang.org

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.

Re: Rue: Higher level than Rust, lower level than Go

#30

Earlier quoted context omitted.

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.

Since it's framed as 'in between' Rust and Go, is it trying to target an intersection of both languages' use-cases?

I don't think you'd want to write an operating system in Rue. I may not include an "unsafe" concept, and will probably require a runtime. So that's some areas where Rust will make more sense.

As for Go... I dunno. Go has a strong vision around concurrency, and I just don't have one yet. We'll see.

Post reply on HN