Live data from Hacker News

Librsvg now requires Rust

mail.gnome.org

11–20 of 29 posts

Re: Librsvg now requires Rust

#11
post #8

" Apologies in advance to distros who will have to adjust their build systems for Rust - it's like taking a one-time vaccine; you'll be better off in the end for it."

Yeah, many distros have Rust packaged already; I can think of at least Debian, Fedora, and Arch. We're working on it...

About time for it to be in all distros. ;)

Re: Librsvg now requires Rust

#12
post #6

Earlier quoted context omitted.

> Rust is great and all, but every time I play with it I just don't see how it would work well with the complex inheritance tree that is a widget toolkit I haven't actually done anything along this route myself, but I think the most promising approach is to model all the widgets as traits (and traits can depend on other traits, which lets you model the inheritance tree).

The problems lie both in the lack of field inheritance (something talked about in Rust as "virtual structs") and the difficulties with modeling a bi-directional tree structure with the borrow checker.

For the bi-directional tree structure, it seems to me you could use Rc for the children and rc::Weak for the parent field.

Re: Librsvg now requires Rust

#13
post #3
post #2

My initial motivation of following Rust is because it is the only language that can integrate into and extend the traditional Linux C world seamlessly except C++, which is generally hated by the open source culture. Glad to see the initial attempt goes well, and hope the gnome people will no longer need to construct GUI with C in the second decade of twenty-first century.

> hope the gnome people will no longer need to construct GUI with C in the second decade of twenty-first century. It may 'compile' to C, but we've had Vala for quite a while now. Honestly, my biggest complaints are the syntax is so close to C# that I always find myself trying to do stupid things like `using System.Collections.Generic;` instead of Gee, etc. Oh, and it would be REALLY NICE if the compiler had support f…

> Rust is great and all, but every time I play with it I just don't see how it would work well with the complex inheritance tree that is a widget toolkit (meanwhile GObject works just fine, even if it's a little verbose at the C-level).

I'm not convinced that this is the best way to build widget toolkits rather than just how it's always been done. I'd like to see one built more on traits like IClickable instead of subclassing button.

HTML/CSS is already like this (for styling only), attributes can be mixed and matched.

Re: Librsvg now requires Rust

#17
post #13
post #3

Earlier quoted context omitted.

> hope the gnome people will no longer need to construct GUI with C in the second decade of twenty-first century. It may 'compile' to C, but we've had Vala for quite a while now. Honestly, my biggest complaints are the syntax is so close to C# that I always find myself trying to do stupid things like `using System.Collections.Generic;` instead of Gee, etc. Oh, and it would be REALLY NICE if the compiler had support f…

> Rust is great and all, but every time I play with it I just don't see how it would work well with the complex inheritance tree that is a widget toolkit (meanwhile GObject works just fine, even if it's a little verbose at the C-level). I'm not convinced that this is the best way to build widget toolkits rather than just how it's always been done. I'd like to see one built more on traits like IClickable instead of su…

The inheritence pattern probably reduces repetition over a trait based approach, which is often interpreted to be better, regardless of actual merit.

Re: Librsvg now requires Rust

#19
post #17
post #13

Earlier quoted context omitted.

> Rust is great and all, but every time I play with it I just don't see how it would work well with the complex inheritance tree that is a widget toolkit (meanwhile GObject works just fine, even if it's a little verbose at the C-level). I'm not convinced that this is the best way to build widget toolkits rather than just how it's always been done. I'd like to see one built more on traits like IClickable instead of su…

The inheritence pattern probably reduces repetition over a trait based approach, which is often interpreted to be better, regardless of actual merit.

IME using inheritence to reduce code is always a mistake, composability is much better.
Post reply on HN