News for hackers. Stuff that matters.
Re:Go 2, here we come by bulldoa on Thursday November 29, 2018 @05:58PM (#18564971)
As a beginner, I really like rust.

It has excellent package management, robust compiler messages, pattern matching... etc. But once I start trying to build non trivial data structures it becomes a nightmare. For example, doubly linked list, any sort of graph is extremely hard for me to build in rust but extremely easy to build in golang.

I am still learning the full capability of rust, hopefully as I do more practice it gets easier. In the worst case I think I would still use it to build data pipelines since I really enjoyed the syntax and the safety check as long as I don't get into smart pointers or raw pointers.

Also another annoying point is that some libraries use nightly.

Re:Go 2, here we come by wscott on Friday November 30, 2018 @08:16AM (#18568811)
I have heard this is a really good resource for understanding this exact aspect of Rust

http://cglab.ca/~abeinges/blah/too-many-lists/book/

Re:Go 2, here we come by Dylan16807 on Thursday November 29, 2018 @06:19PM (#18565120)
I have to ask why you're not using a data structure from a library, though.
Re:Go 2, here we come by amelius on Thursday November 29, 2018 @06:02PM (#18564992)
You're not the only one having trouble writing basic data structures in safe Rust: [1]

[1] https://rcoh.me/posts/rust-linked-list-basically-impossible/

Re:Go 2, here we come by int_19h on Thursday November 29, 2018 @09:54PM (#18566239)
Of course, if you're comparing with Go, you need to compare apples to apples - since Go doesn't have ownership tracking, the equivalent Rust would necessarily have to be unsafe.
Re:Go 2, here we come by amelius on Friday November 30, 2018 @04:55AM (#18567972)
Yeah but Go has garbage collection. Rust's ownership model makes up for not having GC.
Re:Go 2, here we come by int_19h on Friday November 30, 2018 @03:21PM (#18572263)
I think that heap-allocating everything and using Rc<T> and Weak<T> would be a closer comparison to what Go does, than using idiomatic Rust with borrow-checked locals etc.