2 ms·
Because C/C++ would kick ass, exposing the rest of the hipster technologies as lame.
by cynicalsecurity 3y ago
Because C/C++ would kick ass, exposing the rest of the hipster technologies as lame.
- Cyph0n 3y agoThey would also kick memory safety in the ass, unless you’re the kind of dev who doesn’t make those kinds of silly mistakes
- imran-iq 3y agoDon't be that guy. https://github.com/search?q=repo%3Atokio-rs%2Ftokio%20unsafe&type=code https://github.com/search?q=repo%3Atokio-rs%2Ftokio%20unsafe...
- WinstonSmith84 3y agoAre you trying to say that you can write from scratch a code just as safe or better than one of the most peer reviewed crate of Rust? Congrats, the world has been waiting for you, but nonetheless, that's why commoners prefer to stick to what's safer for them
- kouteiheika 3y ago`unsafe` doesn't mean that it's not safe, just that the compiler can't prove that it's safe so the human has to do it manually.
- josephg 3y agoPfft doubtful. Rust, C and C++ all have very similar performance. And apparently a javascript framework is currently beating all of those languages in the composite score on techempower, though that seems a bit weird to me: https://www.techempower.com/benchmarks/#section=data-r21&test=composite https://www.techempower.com/benchmarks/#section=data-r21&tes... C doesn't have a built in, optimized async execution engine of any sort. C with threads would lose to any of the async runtimes here (including javascript). C++ has async now. By all means, write up an async C++ example and compare it. I suspect a good C++ async executor would perform about as well as tokio, but it'd be nice to know for sure. I'd also be interested to see how hard it is to write that C++ code. One nice thing about Rust and Go is that they perform very well with naively written code. (Ie, the sort of thing chatgpt, or most of your coworkers would write.) Naive C would use kernel threads, so if we're comparing average C code to average Go code at this test, the average go code will end up faster. (This isn't always true of rust. I've seen plenty of rust code which uses Box everywhere that runs crazy slow as a result.)
- BackBlast 3y ago> And apparently a javascript framework is currently beating all of those languages in the composite score on techempower, though that seems a bit weird to me: Just-js was essentially built to run the techempower benchmark. It's not a real stack you can use. An exercise in "what is possible".