Earlier quoted context omitted.
I'm not aware of any paintbrushes that refuse to apply any paint unless you hold them in a certain way. They may apply it poorly , but you're still getting some paint on that canvas. I think a more proper tooling analogy is safety tools, like the Saw Stop. They don't guarantee that you make a good construction, but they do either prevent or significantly reduce the chance of you losing a thumb.
So you agree that a tool does not make a good programmer.
Still in love with Rust
101–110 of 186 posts
Re: Still in love with Rust
#102"No race conditions, leaking resources, dangling pointers, unhandled exceptions, ..., the list goes on." Except of dangling pointers, Rust has everything else from this list. About compilation time issue: it doesn't exist anymore. Current versions do "cargo check" in a few seconds even for big projects (my biggest project is 45k LoC) and it takes a couple of minutes to compile it because of incremental compilation. F…
It is indeed true that you can unintentionally leak resources, but it is still much harder. Also, what do you mean that it has unhandled exceptions and race conditions? Rust doesn't even have exceptions (although there are panics, which is not the same thing), and race conditions are statically prevented in safe code due to how a mutable reference works.
Re: Still in love with Rust
#103I was going to try out Rust, then I saw this on the download page curl https://sh.rustup.rs -sSf | sh Really?
Re: Still in love with Rust
#104How does data-centric work? How is it different from OOP? Can someone elaborate for a person using python? Also, what opinion rust devs have over golang?
> How does data-centric work? How is it different from OOP? Rust doens't have objects. You have structs, which are purely data, and functions, which are purely behavior. OOP puts the two together. So in Rust, you don't tend to design things by saying "what are the objects I need?" but rather "what is the data I am manipulating and how do I manipulate it?" > Also, what opinion rust devs have over golang? I am not 100%…
> Are you asking why Rust is better than Go?
No, just the opinion in general, why rust over go? I know go is more oriented to distributed systems, but it seems like rust eventually will be used for that as well. And I also see golang being used to build just anything, like gopass for example.
Re: Still in love with Rust
#105> Rust will force you to be a good programmer, > [if] you like it or not. This is probably the best in-a-nutshell statement that describes what a good programming language is for me. I had similar moments in the past. Before Python I cared about indention to some degree. But once I got used to the way Python forces you to indent your code, I came to the realization that this is pretty much the way I should format my…
> [if] you like it or not.
Perhaps, but I'm convinced that it will at the same time prevent you from becoming a great programmer.
Re: Still in love with Rust
#106Re: Still in love with Rust
#107Earlier quoted context omitted.
So you agree that a tool does not make a good programmer.
It's like the Sapir-Whorf hypothesis. The strong version is nonesense, but the weak version has some evidence. A tool cannot make you a good programmer, but it can help you be a good programmer.
Edit: This place is disappointingly childish... It does not reflect well on Rust, either.
Re: Still in love with Rust
#108Earlier quoted context omitted.
Comprehensions are very easy to format spanned across multiple lines - since they're always enclosed in some kind of brackets, you can split them over multiple lines in a readable fashion: ys = [x + 1 for x in xs if x > 0] or: ys = [ x + 1 for x in xs if x > 0 ]
Both of the examples you give are far less readable than an equivalent for loop with an if statement. Programmers use comprehensions because there is an understanding that they are more efficient and the compiler/interpreter can better optimize them.
I find the split comprehension more readable than the equivalent for loop. That's mostly because I'm used to that style, of course, but it's also because it's more constrained. Comprehensions have a very limited grammar, but there are multiple ways to write a for loop that builds a list.
Re: Still in love with Rust
#109Rust still lacks an effect system, though. Any plans?
Re: Still in love with Rust
#110Earlier quoted context omitted.
I didn't downvote you. Cargo surely recompiles common dependencies across crates, unless one uses the workspace trick and even then recompiles do happen. Just get Gtk-rs, get nightly and then trace the build log. I once even mailed Rust devs about it. Incremental compilation still isn't up to incremental compilation + incremental linking, which is why I explicitly mentioned both on my comment.
To clarify two things you've said: 1. Hacker News won't let you downvote someone who replies to you, so it is literally impossible for you to have downvoted in this situation. 2. Both of you are correct, because you're talking about different things. Evgeniy means "You only need to compile your dependencies upon the first build", and you mean "if I use the same dependency in two projects, it will be compiled twice, o…