Hacker News new | past | comments | ask | show | jobs | submit login

[flagged]



Rust already uses C++ in LLVM so nothing changes there.

This must be the umpteenth rant on C++ I've seen from you. This does not contribute anything. Please stop.


The underlying point is correct though. Rust developers cannot be expected to maintain a C++ implementation of their language. Half of them learned Rust to get away from C++, the other half never knew C++ in the first place.


Most Rust developers can outright ignore gccrs, and those that do want to use it will never need to look at the implementation. Would it be nicer if the GCC frontend was written in Rust? Sure, I guess. But in a quick look none of the GCC frontends are written in anything other than C++, and introducing a new language here would be an entire project on itself.

And since GCC doesn't actually include mature Rust support (yet), this would also mean that building GCC would depend on LLVM.


The GCC Ada frontend is written in Ada (and has been maintained that way in the gcc source tree for well over twenty years now).


Oh right; that seems to be the exception then, because none of the others I checked earlier used anything other than C++.


For what it's worth, rust developers are already maintaining an independent C++ implementation of the language: https://github.com/thepowersgang/mrustc


[flagged]


Since when was "there is an alternative C++ compiler" anything to do with "the canonical compiler is in Rust"? The word "lie" here appears to have the sole purpose of aggravating the reader; it certainly has no meaning correlated with its usual meaning.


Well, rustc is the canonical Rust compiler. mrustc mostly just exists to aid in bootstrapping and really not much else.


I make the difference between canonical and bootstrapping.

When I said canonical, I meant the reference one which will actually be used to compile "normal" rust code.

I guess this reference canonical rust compiler has the decency to be fully written using rust itself, am I wrong? (I was told it is, then if it is not, I was lied to)


It is trivial to verify for yourself without having the risk of being mislead by any person might tell you: https://github.com/rust-lang/rust/tree/master/compiler


The frontend is written in Rust. The backend is just LLVM which is written in c++.


I did check that, and indeed, we get the worst of both worlds.

Really, this is not the "simpler" C syntax I was expecting to see in the end, it seems we get c++2 or c+++. I have been coding for decades from assembly, to many high level languages, I even looked at what seemed to be early rust syntax, and there... OMFG I cannot even read that code and make sense of it, the syntax seems filthy, absurdely, rich. Exactly what it was not supposed to be as far as I can recall. In my experience, the worst syntax was perl5, but it seems we have a serious new contender here.

No, I am not meaning to be nice and complacent, you have to understand that something looks really bad here, and you have to expect such reaction as mine, this is to be expected in the look of this.

I dunno which kind of organized people is financing and pushing that, there is a scent of Big Tech, aka teams of brain damaged people and scammers, worldwide scale.

All I know is I am going to stay away from this, until I get some time to decrypt and understand that f*** syntax, yeah I sadi DECRYPT RUST SYNTAX you bloody lunatics.

Yeah, we had team c++ and now we have team rust, GREAT!


How clean the syntax looks is one of the least important things about a programming language. I don’t know why you’re so hung up on it. But yes, Rust’s syntax is more complex than that of C.

Nobody has ever advertised Rust as “C with simpler syntax” so I’m not sure why you expected that.


[flagged]


Rust is much less complex than c++. Again, I’m not sure why you’re so focused on syntax. That’s the easiest part of a programming language to learn. The semantics, abstractions, etc. are what take the most effort to learn and MUCH simpler in Rust than in C++.


I was told, simpler than C, syntax wise and coding a _real life_ rust compiler implementation being _SIGNIFICANTLY EASIER_ than a C compiler.

That was a lie, period.

rust is just another toxic computer language, but this one seems to be financed and pushed like any other by powerful organized groups of people. As I said, there is a smell of Big Tech.

And I don't forget the "ofc, the canonical rust compiler is written in rust"... (but the real hard work is actually done by llvm which require a c++14 compiler). What a f** joke.

I wanted to update my judgment on rust, well, I did.


> I was told, simpler than C, syntax wise and coding a _real life_ rust compiler implementation being _SIGNIFICANTLY EASIER_ than a C compiler.

Who told you this? Ignoring Rust, most languages are more complicated to implement than C. Only the original Pascal seems simpler, since it has no preprocessor, its syntax is less complicated, and there are fewer implicit type conversions.

It seems unreasonable to me to hate Rust because its compiler is more complex to implement than a C compiler, and because its syntax is more complex. This is just a consequence of it having more concepts built-in to the language, like ownership, lifetimes, crates (i.e. modules), polymorphism, generic functions, etc. Most programming languages are not as stripped-down as C or Pascal.

> And I don't forget the "ofc, the canonical rust compiler is written in rust"... (but the real hard work is actually done by llvm which require a c++14 compiler). What a f* joke.

The only C compilers that are freely available and produce good code are written in C++. C isn't special either.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: