Hacker News new | past | comments | ask | show | jobs | submit login

I've never wanted to use Rust less than after encountering this article.



I mean this is a super detailed introduction in a weird writing style. Does not really represent the experience of writing Rust and more than a very very long article about channel behaviour would represent how it feels to write Go.


I got a little way in and assumed by the dumb gopher and code examples that the author was pushing Go.



Wow, Go is worse than I thought! Sum types aren’t particularly ergonomic in C++ but at least it has them. And it has operator overloading, and generics, and `const`, and deterministic lifetime. To me complex code can be made way more understandable by using the type system to say “this takes a const ref to a IPv4 or IPv6 IP address and returns a future of either a duration in nanoseconds or an error code”. Just like in mechanical engineering, where the units of an equation tell you a lot, the signature of a function in a language with a rich type system tells you that that’s probably a `ping` function. No wonder I have such a visceral averse reaction to Go.


Yep, same here. I was seriously considering diving into it, but any language that can't figure out how to multiply a float and an integer without further guidance from me is not worth the time. Life is too short for that sort of nonsense.


I personally love that Rust doesn't automatically convert between different types of numbers, with different precision and rounding/overflow behaviors. If I'm multiplying numbers of different types, I want the compiler to force me to convert them to a common type. I've been bitten too many times by implicit and lossy numeric conversions in languages like C.


But that's just because C's automatic conversions are broken. C's automatic conversions are not the only possible design. Common Lisp (for example) has a vastly better design. But regardless, I don't see how a reasonable result of multiplying (say) 3.14 by 2 can be anything other than 6.28.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: