-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rust comparison example is unnecessarily complicated #199
Comments
I reviewed this code as well and agree that the example given is a bit unfair to Rust. That being said, I think the point was to show how vlang makes it easier to use a lock on the cursor. |
my issue is that while the point may be true, making it badly is counter-productive and will make newcomers familiar with |
All examples use only stdlib. I understand Rust has lots of cool crates, but it's more to showcase the languages' bulitin tools. Otherwise we also could use an HN lib that could achieve this in one line. |
I've added this info to the website. |
The current example doesn't? That was the point of this issue: using the same dependencies, the current example could be a lot simpler. |
keeping the same dependencies and logic, the
rust
code boils down towith
Cargo.toml
:if you want, you can can go full-on with iterators and maps:
but neither case is as scary as the current code. I can offer a PR if needed
The text was updated successfully, but these errors were encountered: