←back to thread

611 points LorenDB | 1 comments | | HN request time: 0s | source
Show context
jpc0 ◴[] No.43908110[source]
Amazing example of how easy it is to get sucked into the rust love. Really sincerely these are really annoying parts of C++.

The conversation function is more language issue. I don’t think there is a simple way of creating a rust equivalent version because C++ has implicit conversions. You could probably create a C++ style turbofish though, parse<uint32_t>([your string]) and have it throw or return std::expected. But you would need to implement that yourself, unless there is some stdlib version I don’t know of.

Don’t conflate language features with library features.

And -Wconversion might be useful for this but I haven’t personally tried it since what Matt is describing with explicit types is the accepted best practice.

replies(1): >>43908659 #
ujkiolp ◴[] No.43908659[source]
meh, rust is still better cos it’s friendlier
replies(1): >>43908743 #
jpc0 ◴[] No.43908743[source]
I don’t disagree. Rust learnt a ton from C++.

I have my gripes with rust, more it’s ecosystem and community that the core language though. I won’t ever say it’s a worse language than C++.

replies(1): >>43910343 #
noelnh ◴[] No.43910343{3}[source]
Could you elaborate on those points, I'm genuinely curious? So far, I have found the Rust community to be immensely helpful, much more so than I experienced the C++ community. Granted, that's quite some time ago and might be at least partially caused by me asking fewer downright idiotic questions. But still, I'm interested in hearing about your experiences.
replies(3): >>43911010 #>>43911212 #>>43911519 #
1. BlueTemplar ◴[] No.43911212{4}[source]
For where I am concerned, I don't want to have anything to do with the kind of developers that still think that it's acceptable to use Github, VS Code, or Discord in 2025 in a professional setting, much worse teach a new generation of developers to use them : that's like being a doctor and giving out cigarettes to children.