Don't be let down by other comments. The topic itself something I think people would more enjoy when it is more comprehensive. Add more content with your findings, refine and then post again on HN
I'm new to this blogging environment. What do you mean? The HTML's built in formatter? I actually wanted to have these examples ready to be used anywhere else and that's why I chose github gists.
I've recently started learning Rust, and I'm finding it incredibly interesting! However, I'm also encountering a wealth of new syntax, built-in functions, and concepts that are unique to Rust. To solidify my understanding and create a useful resource for myself (and hopefully others), I've been diligently documenting these discoveries.
I've decided to share these insights by starting a blog, where I'll delve into the idiomatic Rust behaviors I'm learning. I've already compiled a substantial collection of examples and plan to discuss them in detail. My goal is to maintain a regular posting schedule, reflecting my ongoing learning journey.
I'd love to hear your thoughts on this project. Additionally, I'm eager to learn about your favorite idiomatic Rust patterns. If you have any specific behaviors or concepts you'd like to see covered in my blog, please share them! Thanks in advance for your feedback and suggestions.
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.
It's not only not really idiomatic, it's almost never necessary in practice.
I was struggling to think of a time I'd ever given a type annotation to an integer local variable - because normally the place the variable ends up dictates the type.
Local variable becomes part of struct? Struct dictates type. Passed into function? Function dictates type. Multiplied by other variable and then that is passed to function? The type is determined by the function.
Maybe I’m missing something because the mobile version is unreadable, but it’s basically one short page with like 3 sections of how to work with ints??
[+] [-] virtualritz|11 months ago|reply
I'd go as far and say that all of it is, by definition, idiomatic.
I guess I'm saying, you could reasonably change the book's title to "Idiomatic Rust".
I'd read that first and then look into what bits it doesn't cover. That could be worth a blog like the one this is about.
[1] https://www.lurklurk.org/effective-rust/
[+] [-] astennumero|11 months ago|reply
[+] [-] wegfawefgawefg|11 months ago|reply
you gotta work on this more before putting it on hacker news
[+] [-] ahoka|11 months ago|reply
[+] [-] astennumero|11 months ago|reply
[+] [-] amalive|11 months ago|reply
[+] [-] astennumero|11 months ago|reply
[+] [-] broneedsjob|11 months ago|reply
[deleted]
[+] [-] tyilo|11 months ago|reply
Not very idiomatic to not use the builtin code formatter...
[+] [-] astennumero|11 months ago|reply
[+] [-] broneedsjob|11 months ago|reply
[deleted]
[+] [-] keyle|11 months ago|reply
Is there anything more than part 1?
[+] [-] astennumero|11 months ago|reply
[+] [-] devsda|11 months ago|reply
OP, this is just feedback and I hope that you'll continue documenting your rust journey even if it's just for yourself.
[+] [-] astennumero|11 months ago|reply
I've recently started learning Rust, and I'm finding it incredibly interesting! However, I'm also encountering a wealth of new syntax, built-in functions, and concepts that are unique to Rust. To solidify my understanding and create a useful resource for myself (and hopefully others), I've been diligently documenting these discoveries.
I've decided to share these insights by starting a blog, where I'll delve into the idiomatic Rust behaviors I'm learning. I've already compiled a substantial collection of examples and plan to discuss them in detail. My goal is to maintain a regular posting schedule, reflecting my ongoing learning journey.
I'd love to hear your thoughts on this project. Additionally, I'm eager to learn about your favorite idiomatic Rust patterns. If you have any specific behaviors or concepts you'd like to see covered in my blog, please share them! Thanks in advance for your feedback and suggestions.
[+] [-] xigoi|11 months ago|reply
[+] [-] johnisgood|11 months ago|reply
As someone else said, I would like to see a TOC instead, personally.
[+] [-] astennumero|11 months ago|reply
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.
[+] [-] LandR|11 months ago|reply
What parts in this article do you think are unconventional?
[+] [-] Hamuko|11 months ago|reply
[+] [-] leoedin|11 months ago|reply
I was struggling to think of a time I'd ever given a type annotation to an integer local variable - because normally the place the variable ends up dictates the type.
Local variable becomes part of struct? Struct dictates type. Passed into function? Function dictates type. Multiplied by other variable and then that is passed to function? The type is determined by the function.
[+] [-] serial_dev|11 months ago|reply
[+] [-] umanwizard|11 months ago|reply
[+] [-] AbuAssar|11 months ago|reply
[+] [-] serial_dev|11 months ago|reply
[+] [-] asimpletune|11 months ago|reply
[+] [-] astennumero|11 months ago|reply
[+] [-] jbhn|11 months ago|reply
The technical arguments for one or the other option are available in a bunch of places, but no good guidance on an idiomatic default.
[+] [-] umanwizard|11 months ago|reply
[+] [-] astennumero|11 months ago|reply
[+] [-] sshine|11 months ago|reply
[+] [-] astennumero|11 months ago|reply
[+] [-] ForTheKidz|11 months ago|reply
[+] [-] globnomulous|11 months ago|reply
[+] [-] astennumero|11 months ago|reply