jcbritobr

joined 2 years ago
[–] jcbritobr@mastodon.social 1 points 6 months ago (6 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.

[–] jcbritobr@mastodon.social 7 points 6 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()

[–] jcbritobr@mastodon.social 1 points 11 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

[–] jcbritobr@mastodon.social 1 points 11 months ago (4 children)

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

[–] jcbritobr@mastodon.social 0 points 1 year ago (1 children)
[–] jcbritobr@mastodon.social 3 points 1 year 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.

[–] jcbritobr@mastodon.social 1 points 1 year ago* (last edited 1 year ago) (1 children)

@onlinepersona @snaggen another problem I see people doing while writing rust, is trying to write code like java. Rust isn't an OO language, but you can organize your code and have hierarchies.

[–] jcbritobr@mastodon.social 4 points 1 year ago* (last edited 1 year ago) (2 children)

@onlinepersona @snaggen

people write oo code in linux source code using c. With rust is simple. Just use composition, and you can explore the traits, that serves as and is better than interfaces.

view more: next ›