Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Rust compiles to LLVM IR, which is better than compiling to C++ (for reasons I've elaborated on before).

As for library and tool support, I think a safe subset of C++ couldn't actually use tools for "real" C++, because the languages would be too different.



I'm sorry, but I feel like all these "Just use Rust!" comments are written by idealistic college students.

Yes, maybe Rust is better, and maybe if we could push a button and make everyone use it the world would be a better place.

But the reality is that there are very few code bases written in Rust and an uncountable amount written in C++ - there are decades of work behind C++ and decades of work will still be done in C++. I need to earn a living TODAY and work in the current reality, and I need tools to help me be more productive. I can't wait 5 years for some brand new language to take over.


I think you're misinterpreting what pcwalton said. Sure, seeing "use Rust" in every possible place is quite annoying, but what pcwalton described is why "compiles to C++" and "has 2 decades of libraries" don't work for new languages. He didn't say to use Rust, he was just pointing out that your two ideas aren't viable.


> But the reality is that there are very few code bases written in Rust and an uncountable amount written in C++

Most libraries use a C ABI due to it being stable, and Rust has fantastic FFI support for C (although tools to take in a .h and spit out the FFI in Rust are definitely needed). There's no performance cost to FFI in Rust, either, it's just a function call. As someone that spends a lot of time in an existing C++ codebase, FFI with zero overhead offers a very enticing migration path.

But as you were asking about making a new language, I was just pointing out the language you were starting to design has already been built.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: