HN user

sinhpham

64 karma
Posts2
Comments26
View on HN

I find myself increasingly doing this in Rust:

    let lines = {
        let ret = vec![];
        // Open file
        // Read into ret
        ret
    };
    let processed_data = {
        // Open another file
        // Use lines
        // Construct ret
        ret
    };
    ....

You get the best of both worlds this way: scoped, meaningful names like with sub-functions and the continuity of a long one.

Everything is an expression is an underrated feature of Rust.

What other cool stuff can "management, strategy, and customer satisfaction cadres" even do? And if just because "management, strategy, and customer satisfaction cadres" is not doing "supercool stuff" (whatever it means), the company should focus on R&D, then the vast majority of companies should cease to exist. Like it or not, companies are here to make money.

Saying MS should reinvent itself to be a R&D company is like saying Toyota should stop making cars because their normal cars aren't running by water, auto driven, and charged by solar panels yet. Ya, what's the point? Use your money to research on energy, AI and what not. Never mind where that money comes from.

When I read these absurd statements I think the author is either trolling, has an agenda, or is living in a bubble.

Is the currying example even currying? It looks like it's just a function returning a function to me. I thought currying it's some thing like func contains(subString: String, string: String) -> Bool, and calling contains("a") would automatically return a func(x: String) -> Bool.

My bad, yes I don't need to log in to view the docs if I go directly to support.appharbor.com. But from the main page, when I click "Support", it forces me to log in.