News for hackers. Stuff that matters.
Re:Introducing MIR by Sacho on Thursday April 28, 2016 @02:36AM (#11586893)
My only complaint is the mix between snake_case and PascalCase. I tried removing it(in favor of snake_case, but you could probably get a similar result if going full PascalCase), and it looks much better(no guarantee it has the same semantics, I've never worked with rust):

     fn handle_message(&mut self, find_node_query: messages::find_node_query) {
        let origin = node::udp_node::deserialize(find_node_query.get_origin());
        let target = address::from_str(find_node_query.get_target());

        {
            // Borrow self.routing_table first time
            let nodes: vec<&box<node::node>> = self.routing_table.nearest_to(&target);
            let response = message::response(
                self.transaction_ids.generate(),
                response::find_node(&self.self_node, nodes)
            );
            origin.send(response.serialize());
        } // Done borrowing self.routing_table here

        // Borrow self.routing_table again
        self.routing_table.insert(origin);
    }
Re:Introducing MIR by kibwen on Thursday April 28, 2016 @04:41AM (#11587303)
It sure does look more like C that way (if that's something you're into), but that also makes it harder to scan for types at a glance.
Re:Introducing MIR by pcwalton on Thursday April 28, 2016 @06:04PM (#11592247)
Rust used to work that way, but it was changed primarily to visually distinguish between enumerated variant names and variable bindings in patterns. e.g. match foo { none => ... } and match foo { non => ... } having completely different interpretations was confusing.