jcbritobr

joined 2 years ago
[–] [email protected] 1 points 4 months ago* (last edited 4 months ago)

@asdfasdfasdf @kaffiene I think build a linked list is the last stage of learning rust, because linked lists has circular references that can lead to memory leaks and other memory issues. Build one with rust is hard, because the compiler will not easy for you to make mistakes, but if you can write a linked list, you can write anything in rust. Try this book.

https://rust-unofficial.github.io/too-many-lists

[–] [email protected] 1 points 4 months ago* (last edited 4 months ago) (1 children)

@asdfasdfasdf @kaffiene As the friend above says, rust require some time and have a learning curve. Its very different, and thats why people gets strugling with the language. As you got proficience, it will save you hours of debug. I suffered with the learning curve also, but I needed to change the way I was think about how to program.

[–] [email protected] 2 points 4 months ago (10 children)

@kaffiene @asdfasdfasdf Its slow when you dont know what youŕe doing. For example, build a linked list in #rustlang is different then build one in java, because you can´t leave the variables in a wrong state. It's only a different approach, not a slow approach.

[–] [email protected] 7 points 4 months ago (3 children)

@larix @Ephera it's better to return an Option<&str> as a String may DeRef to &str.

For example

self.name.as_deref()

[–] [email protected] 1 points 9 months ago (2 children)

@iso all the errors are the same. Missing trait implementations. Already see c++ template issue with dozens of lines. There are some tools that helps like the below. But if you had 100 missing traits implementations, you will got a 100 error lines report.
https://github.com/zkat/miette

[–] [email protected] 1 points 9 months ago (4 children)

@iso In my opninion they are pretty neat, if you use their monads correctly.

[–] [email protected] 0 points 10 months ago (1 children)
[–] [email protected] 2 points 10 months ago (1 children)
[–] [email protected] 3 points 10 months ago (1 children)

@onlinepersona Got this issue two days ago. Someone upload a package with same name of mine. I was need to change the name to also upload.

view more: next ›