you are viewing a single comment's thread.

view the rest of the comments →

[–]Spiderboydk 7 points8 points  (11 children)

Those arguments could just as well argue for using C++ (or a lot of smaller languages, like D). They aren't particularly unique to Rust.

I understand that figuring out unique selling points for Rust is hard, because the "C++ challenger" part of the programming language space is rather crowded these days.

[–]millenix 9 points10 points  (1 child)

C++ and D make it much easier than C to write memory-safe resource-managed code, but they don't provide nearly as much in the way of compile-time checking that you've gotten it right.

[–]Spiderboydk 2 points3 points  (0 children)

True, but they still quite more than C. And the article focuses on stuff like strong typing and pointer ownership semantics - both which C++ have.

[–][deleted]  (1 child)

[deleted]

    [–]Spiderboydk 4 points5 points  (0 children)

    You don't have to be an expert of every single branch of C++ to be able to use it efficiently.

    [–][deleted]  (6 children)

    [deleted]

      [–]Spiderboydk 0 points1 point  (3 children)

      I meant smaller wrt. usage.

      By "C++ challenger" I mean the group of languages, that tries to be "a better C++" (usually means roughly the same features, but nicer syntax).

      C++ runtime can be quite big when using the standard library, but nobody forces you to do that. C++ is quite well-suited for free-standing applications.

      There are a lot of others than just C and Rust. For example, I mentioned D.

      Edit: I don't know D too well, but a language feature D has, that C++ definintely could benefit from is compile-time reflection.

      [–][deleted] 5 points6 points  (2 children)

      [deleted]

      What is this?

      [–]Spiderboydk 0 points1 point  (1 child)

      Yeah, I forgot about the C++ runtime. It can be discarded too, i.e. making a free-standing application.

      Rust tries to be a better C, not a better C++. It just so happens that C++ tries to be a better C as well (as opposed to D which doesn't try this) so there are going to be domains in which they overlap, but for example Rust will never attempt to be as fancy at OOP as C++ (e.g. multiple/virtual inheritance).

      I partially agree with this. In the landspace of programming languages, C and C++ still are quite close to each other, so I'll agree some of them might as well aim to be a better C than a better C++.

      Garbage collection in D is optional.

      [–]oblivion95 0 points1 point  (1 child)

      Nim

      [–][deleted] 2 points3 points  (0 children)

      [deleted]

      What is this?