Show HN: Rocket – Web Framework for Rust
21–30 of 123 posts
Re: Show HN: Rocket – Web Framework for Rust
#22Re: Show HN: Rocket – Web Framework for Rust
#23One of my influences, Armin Ronacher, has been doing a lot of Rust work lately, so I've been thinking about looking at it more closely since I appreciate his Python tastes. Is Rust simple and elegant in the sense that Python is? I've also heard it's for systems programming, which makes me think of C and has kept me away from it. I like how I can bang out scripts quickly in Python. Is the same true of Rust? edit: foun…
> I've also heard it's for systems programming, which makes me think of C and has kept me away from it. One of its major goals is making systems programming more accessible. So you shouldn't dismiss it because "systems programming = C", it's trying to change that! :) That's not to say it won't involve learning some systemsy concepts. But it won't be as scary as C. You can't necessarily bang out scripts quickly. A typ…
Rust gives you much more control over how your program runs, but this necessarily means paying a price in expressiveness.
Re: Show HN: Rocket – Web Framework for Rust
#24Are dynamic params enforced at compile time? I.e. will the compiler ensure that the route "/ " has a matching id parameter?
error: 'id' is declared as an argument...
--> src/main.rs:8:9
|
8 | #[get("/")]
| ^^^^
error: ...but isn't in the function signature.
--> src/main.rs:9:1
|
9 | fn hello() -> &'static str {
| _^ starting here...
10 | | "Hello, world!"
11 | | }
| |_^ ...ending hereRe: Show HN: Rocket – Web Framework for Rust
#25Earlier quoted context omitted.
> I've also heard it's for systems programming, which makes me think of C and has kept me away from it. One of its major goals is making systems programming more accessible. So you shouldn't dismiss it because "systems programming = C", it's trying to change that! :) That's not to say it won't involve learning some systemsy concepts. But it won't be as scary as C. You can't necessarily bang out scripts quickly. A typ…
I guess I'm contrasting Python with my Java experience so far as banging out prototypes quickly. In Java, I don't think the type system gets in the way so much as its classpath. It's been a long time since I've done Java, but you'd have to get your jars in order and write an ant or maven script to do the compile/run steps (or at least a bash script). I like that with Python I can just do pip install whatever and begi…
Re: Show HN: Rocket – Web Framework for Rust
#26UUIDs 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"] }Re: Show HN: Rocket – Web Framework for Rust
#27Syntax is amazing! Hope (so much) to see it possible on beta soon. Maybe for somebody it's not a new thing, but for me this: struct Message { contents: String, } #[put("/ ", data = " ")] fn update(id: ID, message: JSON ) where message is auto-decoded - it's awesome!
Re: Show HN: Rocket – Web Framework for Rust
#28Earlier quoted context omitted.
> I've also heard it's for systems programming, which makes me think of C and has kept me away from it. One of its major goals is making systems programming more accessible. So you shouldn't dismiss it because "systems programming = C", it's trying to change that! :) That's not to say it won't involve learning some systemsy concepts. But it won't be as scary as C. You can't necessarily bang out scripts quickly. A typ…
I guess I'm contrasting Python with my Java experience so far as banging out prototypes quickly. In Java, I don't think the type system gets in the way so much as its classpath. It's been a long time since I've done Java, but you'd have to get your jars in order and write an ant or maven script to do the compile/run steps (or at least a bash script). I like that with Python I can just do pip install whatever and begi…
Re: Show HN: Rocket – Web Framework for Rust
#29Earlier quoted context omitted.
> I've also heard it's for systems programming, which makes me think of C and has kept me away from it. One of its major goals is making systems programming more accessible. So you shouldn't dismiss it because "systems programming = C", it's trying to change that! :) That's not to say it won't involve learning some systemsy concepts. But it won't be as scary as C. You can't necessarily bang out scripts quickly. A typ…
I guess I'm contrasting Python with my Java experience so far as banging out prototypes quickly. In Java, I don't think the type system gets in the way so much as its classpath. It's been a long time since I've done Java, but you'd have to get your jars in order and write an ant or maven script to do the compile/run steps (or at least a bash script). I like that with Python I can just do pip install whatever and begi…
Re: Show HN: Rocket – Web Framework for Rust
#30One of my influences, Armin Ronacher, has been doing a lot of Rust work lately, so I've been thinking about looking at it more closely since I appreciate his Python tastes. Is Rust simple and elegant in the sense that Python is? I've also heard it's for systems programming, which makes me think of C and has kept me away from it. I like how I can bang out scripts quickly in Python. Is the same true of Rust? edit: foun…