ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi guys, I have a question regarding a paper that I’m undertaking in relation to low level development. Hypothetically speaking what if Linux was written in rust as opposed to C? What advantages would it have? Would it a difference performance/ security wise? I know that the question is redundant but if Rust was available back then would it have been a viable option to develop Linux? As I know that C has always been the choice for low level development due to it ‘doing everything well’, but rust also has many benefits which have been highlighted by developers. Thank you for assistance.
Hi guys, I have a question regarding a paper that I’m undertaking in relation to low level development. Hypothetically speaking what if Linux was written in rust as opposed to C? What advantages would it have? Would it a difference performance/ security wise? I know that the question is redundant but if Rust was available back then would it have been a viable option to develop Linux? As I know that C has always been the choice for low level development due to it ‘doing everything well’, but rust also has many benefits which have been highlighted by developers. Thank you for assistance.
Your question seems rather general, and I'd like to know more about your personal opinions, especially since you are writing this paper. Such as what are these benefits highlighted by developers?
I personally have always felt about all the bells and whistles that purveyors of many other languages promote, that all of those can be available in C, and it depends how you write your code.
The way the code is designed and written, and the standards adhered to, are what make a software design a quality one.
If someone decided to write an OS using Rust, and some are, I feel they'd find things which they needed to establish conventions for, so as to avoid problems with a large body of code that is written by, and maintained by, a very large community.
To answer your total question of:
Quote:
Originally Posted by naf90
Hypothetically speaking what if Linux was written in rust as opposed to C?
There still would be a group of people spearheading the project, they still would have standards for testing, coding styles, and acceptance criteria before they would allow introductions of new code into the OS. In short, it would be highly the same, just in a different language.
rant
What if they stop fooling with ways to avoid assembly? I'd prefer a pure assembly OS like menuetOS that has the support like Linux.
end of rant.
Things kind of go with the tide. Doubt they will get rid of C soon. Doubt much would change overall. You'd have to assume that people who were writting back when in C would have had basically the same training to do the same tasks in any other language.
Hi guys, I have a question regarding a paper that I’m undertaking in relation to low level development. Hypothetically speaking what if Linux was written in rust as opposed to C? What advantages would it have? Would it a difference performance/ security wise? I know that the question is redundant but if Rust was available back then would it have been a viable option to develop Linux? As I know that C has always been the choice for low level development due to it ‘doing everything well’, but rust also has many benefits which have been highlighted by developers. Thank you for assistance.
Naf
This is my personally opinion and there are likely others who may know more than me on this topic. I feel that the advantages are minimal to none, keep in mind things like Rust and Go are really all in all built off and forked from C. Typically the reasons they are used is due to it being "easier" to manage things like memory. However this isn't true. They are merely designed to do a lot of that for you, think of them as a more featured version of C. All in all I believe that systems will continue to be (and should be) written in C. There is no reason to switch. While there are many different views in regards to programming languages I personally think that languages built off of C, such as C++, C#, Rust, Go etc. can't do anything that can't be done with C. This is my personal opinion on this topic and there are likely many much more qualified people who can speak on this topic, but C isn't like Assemble. C is portable, fast (one of the fastest languages out there) and extremely flexible. I don't think it is going anywhere anytime soon, especially in lower level system development and computer engineering.
Neither C nor Rust is "low level development" I think of C as a 2 1/2 generation language.
Low level to me means machine language, or at least assembler.
I think that's a good way of putting it. C often gets lumped in with the other 3GLs, but I'm not sure that is a correct classification for a language that doesn't have a string type and requires you to do so much memory management.
I haven't paid much attention to Rust yet, I'm still waiting to see whether it gets any traction or turns out to be just another flavour of the month.
I come from a different universe - for several decades I did nothing but (IBM) assembler. Over time the pool of people that could dried up, and so did the employment opportunities as customers (and IBM) moved to other languages.
I have no interest in learning x86 assembler in depth - the various compilers can optimise code for various chipsets better than I could ever contemplate. Even the interpreted languages (LUA for example) are amazing.
I come from a different universe - for several decades I did nothing but (IBM) assembler. Over time the pool of people that could dried up, and so did the employment opportunities as customers (and IBM) moved to other languages.
I have no interest in learning x86 assembler in depth - the various compilers can optimise code for various chipsets better than I could ever contemplate. Even the interpreted languages (LUA for example) are amazing.
I have a huge respect for those who worked in lower level and helped make computing what it is today. Mind if I ask what part of development you worked in? Was it BIOS and Firmware or compilers?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.