News for hackers. Stuff that matters.
Re:Why I’m dropping Rust by loup-vaillant on Sunday September 11, 2016 @02:47PM (#12474933)
So, you want class based polymorphism, and you want trees of objects with back references. Sounds like Qt to me. I have the feeling the author tried to translate his knowledge of OOP languages to Rust.

Bad idea. Try F# first.

Seriously: my current favourite language is Ocaml, and it would have basically the same problems. But I don't care, because I don't think like that. I have other ways to solve my problems.

Re:Why I’m dropping Rust by mcguire on Sunday September 11, 2016 @03:09PM (#12475041)
Ocaml has a GC and supports class based inheritance, right?
Re:Why I’m dropping Rust by loup-vaillant on Sunday September 11, 2016 @03:27PM (#12475140)
> Ocaml has a GC

Yes, but the language is immutable and eager by default. That makes circular references a chore.

> and supports class based inheritance

Yes, but hardly anybody uses that part of the language. We tend to stick with modules and variations over them.

Re:Why I’m dropping Rust by mookid11 on Sunday September 11, 2016 @03:36PM (#12475190)
> Yes, but hardly anybody uses that part of the language. We tend to stick with modules and variations over them.

You can have inheritance via polymorphic variants: see Garrigue's `Code reuse through polymorphic variants`.

Re:Why I’m dropping Rust by loup-vaillant on Sunday September 11, 2016 @04:25PM (#12475490)
I have never used polymorphic variants… Too lazy to learn.
Re:Why I’m dropping Rust by mercurial on Monday September 12, 2016 @12:30AM (#12477196)
Actually, I think most of the OCaml GUI libraries (lambda-term, for instance) do use objects and classes, because it makes sense in that context.