Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

"Rust vs. C++ Comparison"

49 views
Skip to first unread message

Lynn McGuire

unread,
Oct 12, 2018, 2:33:53 PM10/12/18
to
"Rust vs. C++ Comparison"

https://www.codeproject.com/Articles/1263195/Rust-vs-Cplusplus-Comparison

Very informative. Interesting but not gonna happen.

Lynn

Öö Tiib

unread,
Oct 12, 2018, 3:39:03 PM10/12/18
to
What is not going to happen? Rust works and about as efficiently as C++
and C. It is indeed bit annoying to program in Rust. But some like
those inconveniences.

Efficiency advantage of C, C++ and Rust actually exists only in very
good hands. Several other languages like Haskell, Lisp, FORTRAN,
JavaScript and proprietary languages of Oracle, Microsoft, Google
and Apple are close enough. There are no real point to translate
between those languages because of efficiency.

Therefore Rust plays a quite attractive card of compile time protection
against buffer overflows, nulls and race conditions that C and C++
don't have. ;)

Melzzzzz

unread,
Oct 12, 2018, 5:25:14 PM10/12/18
to
On 2018-10-12, Öö Tiib <oot...@hot.ee> wrote:
> On Friday, 12 October 2018 21:33:53 UTC+3, Lynn McGuire wrote:
>> "Rust vs. C++ Comparison"
>>
>> https://www.codeproject.com/Articles/1263195/Rust-vs-Cplusplus-Comparison
>>
>> Very informative. Interesting but not gonna happen.
>
> What is not going to happen? Rust works and about as efficiently as C++
> and C. It is indeed bit annoying to program in Rust. But some like
> those inconveniences.

Rust is not an OO language. Also it does not have pointer arithmetic,
so if you want it you have to cast to integer then add, then convert
back to pointer.
traits in Rust are mainly used as constraints for generic functions.
You can't implement doubly linked list with safe code and almost
anythingi at that.
Language is not stable at all. What you compile by stable version
won't compile with nightly and vice versa.
But it is good in a sense that it borrowed from functional languages.
Also, macros are better.
after moving object, destructor won't be called
of moved object. And lot of other things are nice.
here are my two repos one is trees other is scimark2 in Rust:
https://github.com/bmaxa/trees_rust
https://github.com/bmaxa/scimark2rust
You can't see that indeed that you can program unsafely in Rust ;)


--
press any key to continue or any other to quit...

Lynn McGuire

unread,
Oct 12, 2018, 6:51:28 PM10/12/18
to
Yeek, we use sparse object distribution with copy on write. Rust sounds
like it would be a total disaster for that whereas C++ handles it easily.

Lynn

Melzzzzz

unread,
Oct 13, 2018, 2:58:48 AM10/13/18
to
On 2018-10-12, Lynn McGuire <lynnmc...@gmail.com> wrote:
>
> Yeek, we use sparse object distribution with copy on write. Rust sounds
> like it would be a total disaster for that whereas C++ handles it easily.

I am not familiar with that term. google is not helpfull ;)

>
> Lynn

Öö Tiib

unread,
Oct 13, 2018, 7:50:01 AM10/13/18
to
On Saturday, 13 October 2018 09:58:48 UTC+3, Melzzzzz wrote:
> On 2018-10-12, Lynn McGuire <lynnmc...@gmail.com> wrote:
> >
> > Yeek, we use sparse object distribution with copy on write. Rust sounds
> > like it would be a total disaster for that whereas C++ handles it easily.
>
> I am not familiar with that term. google is not helpfull ;)

The internet is full of "copy on write" but "sparse object distribution"
gave only about dozen very mildly related to each other results.
0 new messages