I'm not sure the syntax extension specific items are good if the intent is to present this as an argument for moving to Rust from some other language for building such a framework. I'm a bit biased: I'd avoid using syntax extensions that aren't part of the standard, because it adds a point of friction for novice and seasoned Rust developers alike.
In this specific case, yes those particularly would be an example.
But I don't mean in comparison to other languages or frameworks, I mean in generally, as in, I'd avoid creating syntax extensions or using them in any project.
i understand your argument but if you look at <https://news.ycombinator.com/item?id=13246361>, it seems clear to me the use of syntax extensions created an awesome developer experience that would be otherwise impossible (sure you could use the built in typesystem but then you wouldn't have human readable routes in the source)
UUIDs seem like it would be easier to use for demonstration : https://doc.rust-lang.org/uuid/uuid/index.html And Cargo.toml declaration might need an extra sentence or two to explain the "features" part but that shouldn't be too bad:
[dependencies]
uuid = { version = "*", features = ["v4"] }
This looks pretty nice, it reminds me of Play! framework for Scala. I am curious to see if Rust or Swift will prevail for this kind of thing. Both have the opportunity to reach fairly deep into systems programming all the way up to UI and webapps.
Comments (114) 25 threads
Earlier commentsBut I don't mean in comparison to other languages or frameworks, I mean in generally, as in, I'd avoid creating syntax extensions or using them in any project.
UUIDs seem like it would be easier to use for demonstration : https://doc.rust-lang.org/uuid/uuid/index.html
And Cargo.toml declaration might need an extra sentence or two to explain the "features" part but that shouldn't be too bad:
All comments shown.
Couldn't load more comments. Check your connection and try again.