Comment

Comment by Thaxll

Why would you want to do that in Rust instead of Go / Java / C# since the performance is the same. When I look at code example in the article the syntax is just awful seriously, who want to write web services with that kind of syntax:

time_helpers::log_timed(&log.new(o!("step" => "upsert_episodes")), |_log| { }

It's just non-sense:

impl<S: server::State> actix_web::middleware::Middleware<S> for Middleware {

        fn start(&self, req: &mut HttpRequest<S>) -> actix_web::Result<Started> {

            let log = req.state().log().clone();
            req.extensions().insert(Extension(log));
            Ok(Started::Done)
        }
Rust is a good language but I don't see it any time soon in the web space with that syntax and the lack of mature libraries, plus the time it takes to get anything done. Where I see it is more for super optimized things like serialization and the like as libraries but not as a main program.
parent Thaxll 8 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton