Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Rust is fantastically expressive for a low level language.

And modern C++ is not 15 years old C++. You have auto, lambda, etc. I just think it's silly to try to pretend to be more expressive than scripting languages.

It's like Schwarzenegger trying to pretend it's as flexible as gymnast. What for? The guy is amazing at what he does.



sort by: page size:

He seems pretty chill about Rust, maybe even positive.

He hates C++ with a passion though. (Like CVS.) And .. it's understandable. C++ did not fix anything back then, that he cared about. Quite the opposite, only made things even worse for low-level code, because it was even more undecipherable by mere mortals. (And ... mostly still is.)


Neat project. It looks like this was largely written by one person, and I'm fairly in awe at anyone who can take a big project like a compiler this far alone.

Isn't there a bit of cognitive dissonance in believing that Rust as a language is an important idea (i.e. by the additional code safety and code maintainability that it conveys), but then simultaneously making the effort to rewrite the current Rust-implemented compiler in C++?

C++ is fast, but aside from a shared value around performance, it has fairly little in common with the ideas that Rust is built on.


Agreed, but I would probably still be programming in C++ if the tooling weren’t so bad, irrespective of the expressiveness. That said, I’m glad Rust is expressive, but more glad that it picked a coherent set of language features—it feels much less cobbled together than C++ if only for the benefit of hindsight.

100% agree. I am amazed how Rust is constantly touted as a general purpose programming language. In theory that's true, but in practice it only makes sense for projects where you would otherwise reach for C++.

I would love examples of writing about rust that didn't mention or assume any C/C++ knowledge before. So much of what I've run into assumes that knowledge.

I'd love to read tutorials or books that assume Rust is someone's first programming language, period. What would that look like?


What do you think about a language like Rust that is trying to bring some of these ideas into a C++-like language from the get-go, without the necessity of interacting with code written more than two decades (or one decade, or one year, or sometimes even one month) ago?

I'm curious because you seem to have made two different points: 1) it doesn't make sense because adding new features to such an old and widely used language is hard, and 2) it doesn't make sense because of the kind of language C++ is. (1) isn't true for Rust, but (2) is.


Rust full-timer with a background in C/C++, lately using neither at all. That opinion isn't as unpopular as you'd think.

Rust is beyond even current C++ with respect to compile time code.

I love Rust. Rust can be frustrating for those who didn't do enough c/c++ but once your brain and eyes get used to it, it becomes a joy to develop with. I never felt so excited writing code unless with Rust nowadays and back when I learned C++ for the first time more than 10 years ago when I was still a teenager. Rust is the closest thing to a perfect language ever existed imho.

EDIT: for some reason I get mass downvoted for whatever I say on this retarded website. Thank you this was my last one. Never seen so much insecure retards who want to feel in control for once in their pathetic lives in any other social website. You should rename this website to "Insecure Hacker News".


The funny thing is, to somebody who's neither involved too much in C++ nor Rust, Rust syntax looks just as arcane as C++ ;)

When I think about Linus’ lack of objection to Rust I immediately think about his vocal disdain for C++

When I learned rust I thought it felt more C-like than C++ to be honest. Nowadays I’m pretty happy to be in this c to rust to c loop.

I think you’re exactly right about c++ not offering much benefit to someone like Linus. It’s much simpler than c++. Rust has also informed the way I write C (granted, I’ve also gained more experience along the way, but rust forced me to have more discipline for sure).


I’m usually somewhat critical of Rust… but not when I encounter C++. What an over-engineered shitshow. Rust looks like a simple set of useful tools compared to C++’s convoluted warehouse of horrors.

Would he use C++ or Rust?

C++ is way more complicated than Rust though.

I think its amazing that all these tools being rewritten in rust are likely being done by people that likely do not typically code in C/C++ but did code something like this in rust.

To be that says Rust is more easily accessible as a language than C/C++ and that's great for our environment (speed is green) and our joy in computing (speed is happiness).


I like Rust because C++ is simply beyond my cognitive abilities.

When you do new things, one of the challenges is other people's mental prototyping process. Crowds line up to say, "it's like x," when it's not. They just don't grok you yet. It takes time for people to get used to unfamiliar ideas.

Rust is a multi-purpose language, with an emphasis on clever type systems. That's not Blow's focus.

He wants there to be a clear path between simple code he's writing and the fast compiled code that results. He likes C, specifically this quality: you can reason about what the hardware is doing, and write C, and count on it doing exactly what you want. His emphasis in the work he's doing is to make a memory-foundry language that stresses this kind of power, with less of C's warts (and non of C++'s).

Mundane example: he has created a not-annoying function pointer syntax. Less obvious: he has created a high-level syntax that appears to be array-of-structs, but which you can /reason/ will be compiled to struct-of-arrays for caching purposes.


C++ is an example of a language whose features were very thoughtfully considered and not bolted on at all when it was as young and untried as Rust is now.

A few years ago I was a C evangelist. C++ was and more so now is a fine language with a lot of features I want. But Rust has that simplicity in a systems language that I crave that lets me do my own thing. That elegence. It's my favourite language by far. Keep it up!
next

Legal | privacy