Thread: Let's talk about Rust!

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    Quantum computeras need to be invented before they are popular.

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quantum computers (compilers?) must be understood before they're invented o_O
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    *nullptr
    Posts
    2,657
    If quantum computers need more than an abstracted and simple understanding of modern physics, I'm doomed if I live to see them!
    But as one does not need to master electronics or VLSI design to be a good C++ (or..err..Rust) programmer, there is still some hope.

  4. #4
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    I don't personally consider quantum computers the next architecture. Despite the research being done, I find the whole notion too much into the realm of science fiction. We'll probably first experience a new generation of computers based on biochemistry, DNA and/or molecular biology.

    Anyways, the merits of a programming language have really very little impact on that programming language ability to phase out a well established competitor. It really, for the most part, irrelevant how much better or worst Rust is compared to C and C++. People will just not flock to Rust because it is better. People will just not stop doing C or C++ because they are worse. The gains have to be significant for industry well established practices to die out. This is true of any industry, not just software engineering. We need more than a discussion on type safety. Many languages, including interpreted ones, offer much better solutions than c or C++ in particular areas of programming. Rust is just another one.

    If Rust wants to establish itself in the industry, it better offer C and C++ interop. That's the simple truth of it in this industry of ours.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  5. #5
    Internet Superhero
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    964
    Quote Originally Posted by Mario F. View Post
    Many languages, including interpreted ones, offer much better solutions than c or C++ in particular areas of programming. Rust is just another one.
    But by virtue of being interpreted or just very high-level they cannot compete with C in the areas that have made C as popular as it is. Rust is one of a number of new languages (see Nimrod for example) that offers many of the features of high-level interpreted languages while still retaining the low-level control of C.

    If Rust wants to establish itself in the industry, it better offer C and C++ interop. That's the simple truth of it in this industry of ours.
    You're completely right. And it does, at least for C.

    Quote Originally Posted by grumpy
    all with the tone of one speaking to unenlightened bigots.
    The fact that you so readily offer such an analysis of the tone with which i'm communicating, but for some reason refrain from doing the same for the first few replies to this thread (or indeed many of the later ones), means i cannot take you seriously in the slightest.
    How I need a drink, alcoholic in nature, after the heavy lectures involving quantum mechanics.

  6. #6
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    Quote Originally Posted by Neo1 View Post
    The fact that you so readily offer such an analysis of the tone with which i'm communicating, but for some reason refrain from doing the same for the first few replies to this thread (or indeed many of the later ones), means i cannot take you seriously in the slightest.
    Not convenient to your wish to blame other members rather than yourself for this thread going off the rails, eh? The tone of the first few replies were either seeking background (the query about origin of "crate"), scepticism about one of the features, and observations based on previous experience (the others).

    You're the one who made the first disparaging remark about another member. Yes, I've disparaged you since, but my first post in this thread was after you had posted several disparaging remarks.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  7. #7
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by Neo1 View Post
    You're completely right. And it does, at least for C.
    Rust is still under development, but as of now it doesn't offer yet full interop with C. Structs aren't yet directly mapped to Rust type definitions and calls to C functions is still under development (iirc to avoid the stack switching that currently occurs).

    Once completed, C interop will dictate Rust success as an usable application/systems programming language. Not because this will mean Rust is ready to phase out C, but because it can wrap C code or be wrapped in C code. This has been the fate of all major programming languages targeting the leading ISA in the industry. i.e. to become usable by certain niches and ignored by everyone else.

    As for C++, it is hard to imagine Rust phasing this one out too. Particularly because C++11 addresses most of Rust improvements in one way or another. Lambdas and templates can implement Rust actor model (which I find, like Erlang, to be Rust biggest contribution considering how awful the idea behind threads always was). C++ meta programming can handle Rust type reasoning and auto and decltype can help with code branch analysis.

    Certainly this increases C++ boilerplate code. It may even be seen as counterproductive. But were I to want to create something similar to Rust in C++, I would have the means. And this is exactly the question many will pose: Would I want to do it? The answer is almost always a resounding no. There's no point. Rust style brings nothing major that warrants the effort. And also because of this, it doesn't justify the tremendous effort of coding and maintaining a new language. Some specialized outfits will move on to Rust, most just won't see the gains in doing so.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  8. #8
    Internet Superhero
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    964
    Quote Originally Posted by Mario F. View Post
    Rust is still under development, but as of now it doesn't offer yet full interop with C. Structs aren't yet directly mapped to Rust type definitions and calls to C functions is still under development (iirc to avoid the stack switching that currently occurs).
    The Rust Foreign Function Interface Guide

    The Rust FFI no longer uses stack-switching when calling external C functions. As far as the C interface itself, it is still under development like the rest of the language, but it is nonetheless fully functional. Plenty of bindings have been written to C libraries at this point.

    Once completed, C interop will dictate Rust success as an usable application/systems programming language. Not because this will mean Rust is ready to phase out C, but because it can wrap C code or be wrapped in C code. This has been the fate of all major programming languages targeting the leading ISA in the industry. i.e. to become usable by certain niches and ignored by everyone else.

    As for C++, it is hard to imagine Rust phasing this one out too. Particularly because C++11 addresses most of Rust improvements in one way or another. Lambdas and templates can implement Rust actor model (which I find, like Erlang, to be Rust biggest contribution considering how awful the idea behind threads always was). C++ meta programming can handle Rust type reasoning and auto and decltype can help with code branch analysis.

    Certainly this increases C++ boilerplate code. It may even be seen as counterproductive. But were I to want to create something similar to Rust in C++, I would have the means. And this is exactly the question many will pose: Would I want to do it? The answer is almost always a resounding no. There's no point. Rust style brings nothing major that warrants the effort. And also because of this, it doesn't justify the tremendous effort of coding and maintaining a new language. Some specialized outfits will move on to Rust, most just won't see the gains in doing so.
    I don't agree that C++11 addresses the most significant improvements that Rust brings to the table, which is also why i don't agree that the creation of the language lacks justification. Regardless, your point about adoption/migration still stands. For a language which is not yet finished and for which adoption is being actively discouraged by the creators, Rust has gained significant traction. In 2013, the Rust repo closed the second-highest number of issues on all of Github and Mozilla has already begun work on Servo. The language is being hyped immensely, which i hope is a sign that we might see a change of attitude. Conversely, the hype might just be the result of me isolating myself in a sort of echo-chamber, i won't rule that out. I do hope that you are wrong, since i think it is high time we faced the fact we will always be dealing with shoddy software as long as we base everything on a language where program correctness is as much of an afterthought as it is in C.
    How I need a drink, alcoholic in nature, after the heavy lectures involving quantum mechanics.

  9. #9
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by Neo1 View Post
    I don't agree that C++11 addresses the most significant improvements that Rust brings to the table, which is also why i don't agree that the creation of the language lacks justification.
    Name a few of these improvements that Rust brings which C++11 cannot imitate.

    I do hope that you are wrong, since i think it is high time we faced the fact we will always be dealing with shoddy software as long as we base everything on a language where program correctness is as much of an afterthought as it is in C.
    I hope you aren't being serious. Correctness is not an afterthought in C++. And I seriously hope you are wrong. We don't need a new language that brings but a few minor improvements. We need more resources on improving existing languages. Put some research into looking if it is possible to bring a language add-on of smart pointers to C++, how it might be implemented such that it brings lots of improvements at little or no cost to compiler vendors instead.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  10. #10
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    I don't find Neo1's intent other than friendly discussion. The internet is a closed book. No need to try to read others' feelings or expressions.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  11. #11
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    Quote Originally Posted by Elysia View Post
    I don't find Neo1's intent other than friendly discussion.
    If you consider disparaging comments - such as characterising someone who questions you from a different perspective as "old and dusty" - to be friendly discussion, then fine. I do not.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  12. #12
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    I find no problem in it. It seems to be more like a casual comment you'd make jokingly in casual conversation.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  13. #13
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Program correctness is as much an afterthought in C as the correct use of the language is in English. The rules are there, the semantics, as is a whole generation of books educating programmers in the correct use of the language. Rust will offer the exact same challenges and will be crowded by the exact same insufferable programmers for whom program correctness is an afterthought.

    Your problem with the C programming language, Neo, is one of false attribution. Direct your batteries to your fellow programmers instead, and you'll quickly realize we've been blessed not with one, or two, or three, but a large number of excellent application/system programming languages.

    (Pepe annoyed me very much today. The Portuguese humiliating loss at the WC. Going to watch Ghana-USA now. Go Team Africa! Sorry fellow Americans.)
    Last edited by Mario F.; 06-16-2014 at 04:04 PM.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  14. #14
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    Not gonna lie, compile-time guarantees about leaks and dangling pointers is pretty sweet. Maybe Rust is worth checking out. It's like C++ and functional programming had a baby.

  15. #15
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Sweet it may be, but it is limited to where the compiler can prove it's wrong. If it cannot prove it is wrong, it is not going to give you a compile error. So it may be nice for newbies and small projects, but for larger ones, I hardly think it will matter.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Do I talk too much?
    By GoodStuff in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 05-20-2003, 10:45 PM
  2. Who wants to talk on AIM?
    By Death Wish in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 07-05-2002, 06:29 AM