The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: segaloco via TUHS <tuhs@tuhs.org>
To: Andy Kosela <akosela@andykosela.com>
Cc: The Eunuchs Hysterical Society <tuhs@tuhs.org>
Subject: [TUHS] Re: yet another C discussion (YACD) and: Rust is not C++
Date: Mon, 30 Jan 2023 18:59:50 +0000	[thread overview]
Message-ID: <RHhaWnWrWHJ6A5gopXMwP3kldg6f7uUUNFlrrJOKh_mTUzzdRTC-2SrEFcKcuI5WjX-1QXP_1YMRox50YRGzCqCze8PB3dvi5DR6cIiKE-o=@protonmail.com> (raw)
In-Reply-To: <CALMnNGiXVeqBznYwhPmwR-jUtq2OMO64HHc2A4F0o+PFJMu3Fw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3200 bytes --]

My understanding is it might "look and feel" more C++-ish than C, but what it is doing under the hood for memory safety and such results in code much closer in candor to C.

C++ relies on a pretty hefty stack of runtime for things that Rust takes care of much earlier through concepts like ownership. The result is that things like memory safety are handled by the compiler's analysis rather than libraries. Sure you may have more modern-looking OOP constructs, but my understanding is those constructs are closer to syntactic sugar than what most C++ environments do with constructing/destructing, passing pointers, concurrency, etc.

Of course, I'm no expert so I'm just speaking from my own experiences with the two languages, but my understanding is Rust is a C-ish systems language parading around in fancy modern clothes, but it achieves most of its more sophisticated functionality at compile time rather than relying on a bunch of runtime code to keep everything rolling.

I don't think Rust will "replace" C any time soon, just like C hasn't really "replaced" FORTRAN and COBOL in a lot of places, but it will continue to grow as a systems-programming language, especially what with the Linux kernel starting to greenlight Rust components. Regardless, I personally see future value in Rust and so I nabbed the book and am slowly learning it. Hopefully it isn't time wasted and we start seeing more Rust-native interfaces out there. One of the main things holding me back is a lack of native OpenGL interfacing. There are binding layers of course, but that's just another stinky layer of code I don't control doing things I may or may not agree with. As for writing my own bindings, I could do that...or I could just write in C and be done with it :P

Who knows, as time goes on though, Rust may verge more and more into that territory of "best of both worlds" with familiar OOP constructs for modern programmers and​ similar performance to C where it counts. If nothing else, I can credit Rust as the first new language I've actually bought the book for in a long, long time.

- Matt G.
------- Original Message -------
On Monday, January 30th, 2023 at 10:47 AM, Andy Kosela <akosela@andykosela.com> wrote:

> On Monday, January 30, 2023, ron minnich <rminnich@gmail.com> wrote:
>
>> I did not want to disrupt the FD 2 discussion, but I could not really let this comment go unanswered:
>>
>> "Smells like C++ to me. Rust in essence is a re-implementation of C++ not C. It tries to pack as much features as it possibly can. "
>>
>> It's hard for me to see how you can say this if you have done any work in Rust and C++.
>>
>> But, short form: Rust is not C++. Full stop.
>>
>> I did not feel that comment should go unanswered, lest people believe it.
>
> Well, I will stand by my opinion, but perhaps you misread what I meant. I meant that as a whole Rust resembles more C++ than C. Technically it might lie in between C and C++, but the amount of "features" certainly bring it closer to C++. While it might be easier to write safer code in Rust than in C++, I still think that its "weird" syntax and feature bloat make me dislike it the way I dislike C++.
>
> Just my .02. YMMV.
>
> --Andy

[-- Attachment #2: Type: text/html, Size: 4606 bytes --]

  reply	other threads:[~2023-01-30 19:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-30 17:24 [TUHS] " ron minnich
2023-01-30 18:47 ` [TUHS] " Andy Kosela
2023-01-30 18:59   ` segaloco via TUHS [this message]
2023-01-30 19:35     ` ron minnich
2023-01-30 21:37       ` Stuff Received
2023-01-31  1:47       ` Alejandro Colomar
2023-01-31  2:55         ` Dan Cross
2023-01-31  3:59           ` ron minnich
2023-01-31 12:26             ` Dan Cross
2023-02-01  0:40             ` Steffen Nurpmeso
2023-02-01  0:49               ` Larry McVoy
2023-02-01  1:03                 ` Luther Johnson
     [not found]                   ` <EjVurdhKm6O8BZ9n0FesPIsZH6sArmVbEN_ikfso8aNlawWIe8ElCGwgaT4ydoWHMNvRty9jDPxFxhLXVXGMjwsTfmfgLgKXcfjpLmqENT8=@protonmail.com>
2023-02-01  2:22                     ` [TUHS] Re: yet another C discussion (YACD) Warren Toomey via TUHS
2023-02-01  0:50               ` [TUHS] Algol rules: was something about Rust is not C++ Will Senn
2023-02-01  1:18                 ` [TUHS] " Chet Ramey
2023-02-01  1:24                   ` Luther Johnson
2023-02-01  0:53               ` [TUHS] Re: yet another C discussion (YACD) and: " Steffen Nurpmeso
2023-02-01 16:34                 ` Luther Johnson
2023-01-31 14:15 ` Blake McBride

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='RHhaWnWrWHJ6A5gopXMwP3kldg6f7uUUNFlrrJOKh_mTUzzdRTC-2SrEFcKcuI5WjX-1QXP_1YMRox50YRGzCqCze8PB3dvi5DR6cIiKE-o=@protonmail.com' \
    --to=tuhs@tuhs.org \
    --cc=akosela@andykosela.com \
    --cc=segaloco@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).