Live data from Hacker News

Idiomatic Rust

a-i-nstein.neocities.org

41–45 of 45 posts

Re: Idiomatic Rust

#41
Thank you everyone for your feedback. Part 2 is now available here: https://a-i-nstein.neocities.org/pages/part-2.

I've addressed the mobile viewing issue. I'll also be working on adding a Table of Contents.

As I'm new to Rust and unfamiliar with unconventional programming paradigms, I understand that some of the concepts I'm exploring may not be idiomatic for experienced programmers. My hope is that this series offers something new to everyone, and I'd be happy if it introduces even just one new concept to someone. That would be my contribution to the community.

Re: Idiomatic Rust

#43
post #7

Earlier quoted context omitted.

If you think any of the features you listed are unique to Rust, you need to learn more languages.

Check out Part 2: https://a-i-nstein.neocities.org/pages/part-2 I hope some of these are unique to Rust. Let me know!

Eh, not at all.

Re: Idiomatic Rust

#44

Thank you everyone for your feedback. Part 2 is now available here: https://a-i-nstein.neocities.org/pages/part-2 . I've addressed the mobile viewing issue. I'll also be working on adding a Table of Contents. As I'm new to Rust and unfamiliar with unconventional programming paradigms, I understand that some of the concepts I'm exploring may not be idiomatic for experienced programmers. My hope is that this series off…

> unconventional programming paradigms

What parts in this article do you think are unconventional?

Re: Idiomatic Rust

#45
post #25

Please do Strings next. Effective Rust isn't useful at guiding to a good default. The technical arguments for one or the other option are available in a bunch of places, but no good guidance on an idiomatic default.

Can you give an example of a situation where you’re not sure what string type to use?

I think Library APIs are a good example. I've found myself in the situation where I do not care about the string representation (or can convert in a few places if necessary), but need to provide an interface for others that is as frictionless as possible. My instinct there was to be generic and use From/To traits, but it never felt quite right.
Post reply on HN