Live data from Hacker News

Is it time to retire C and C++ for Rust in new programs?

theregister.com

21–29 of 29 posts

Re: Is it time to retire C and C++ for Rust in new programs?

#21
post #16

I doing a lot of C++ and I tried to use Rust for some projects and it was really painful. I like the language and cargo is just so much better than cmake. Unfortunately I working mostly on cross platform desktop applications and for that Rust doesn't really have any good libraries. The pure rust library are missing too much features that I consider essential (accessibility, property bindings, declarative ui language,…

> Unfortunately I working mostly on cross platform desktop applications and for that Rust doesn't really have any good libraries.

This can be said about most alternatives to C/C++, though. I tried doing the same in D, Nim, even Golang - and every time I tried to create a decent multi-platform GUI I hit a wall. There were multiple projects, some outdated, some abandoned, and the rest was just incomplete.

Re: Is it time to retire C and C++ for Rust in new programs?

#23
post #19

I am currently programming a processor using C with 64 bytes of RAM. I use and reuse global variables because I can't risk the stack eating that up. Do I need Rust?

64 bytes of RAM? Wouldn't ASM be easier at that point? Or is your code separate from that 64 bytes?

Re: Is it time to retire C and C++ for Rust in new programs?

#24
post #19

I am currently programming a processor using C with 64 bytes of RAM. I use and reuse global variables because I can't risk the stack eating that up. Do I need Rust?

64 bytes of RAM? Wouldn't ASM be easier at that point? Or is your code separate from that 64 bytes?

Yes, I have a whole 1K for program, bliss!

Re: Is it time to retire C and C++ for Rust in new programs?

#25
post #19

I am currently programming a processor using C with 64 bytes of RAM. I use and reuse global variables because I can't risk the stack eating that up. Do I need Rust?

Sir, you need not a better language, but a better processor.

I can power mine off a coin cell.

Re: Is it time to retire C and C++ for Rust in new programs?

#28

It's time to retire the concept of creating new programming languages to "fix" old ones. This is software, and it is updateable. We need to stop thinking in discrete terms and start thinking in continuous terms. If you do not think C and C++ are good, propose solutions to their committees instead of clogging up the digital space with flamebait.

> It's time to retire the concept of creating new programming languages to "fix" old ones.

Is LITERALLY the ONLY way to fix a language. No amount of lipstick can fix C/C++, precisely because is an established language (that amounts for any lang in the moment is settled AND widespread).

But C/C++ is unique in a particular way: Their users are the MOST stubborns of all!

And Rust is the first time the arguments for start new things on C/C++ because reasons are not very very small...

Re: Is it time to retire C and C++ for Rust in new programs?

#29
post #3

What the article completely glosses over is the second part of Russinovich's sentence: "it's time to halt starting any new projects in C/C++ and use Rust for those scenarios where a non-GC language is required ." - now, I know that there are lots of programmers who think that of course, their project needs every last drop of performance the CPU can give them, and are willing to saddle themselves with the complexities…

Ada offers security and simplicity and is already part of GCC but also has llvm now. Linux kernel drivers have also been demonstrated.

Perhaps it would be healthier for Rust to have competition?

https://www.linux.com/audience/developers/hacking-the-linux-...

https://github.com/alkhimey/Ada_Kernel_Module_Framework

https://alire.ada.dev/

Nvidia also chose Spark; a built in subset of Ada as being more cost effective for secure code than C++.

https://youtu.be/2YoPoNx3L5E

Assembly is also supported by Ada and I found it far easier to add than with C even.

C interface support is also excellent.

Post reply on HN