3 ms·
I am still ok with plain and simple C for cross-CPU code, for now. c++ is lost in grotesque and absurd complexity (that's why gcc move to c++ was one of the big
by sylware 4y ago
I am still ok with plain and simple C for cross-CPU code, for now. c++ is lost in grotesque and absurd complexity (that's why gcc move to c++ was one of the biggest mistake in software, ever).
I am one of the guys who would like RISC-V to be successful, then "port" everything to RISC-V assembly, without excessive usage of the macro pre-processor, then forget about compilers.
Linus T. (more likely the guys pulling the strings of the linux fondation financing) green lighted rust in the kernel, I bet this is some horrible gcc extended rust, not core and simple rust (hope they have the decency to compile linux rust code with the rust compiler written in rust). A long time ago, I had a look at rust syntax and was disappointed by the strings hardcoded in the syntax and all that "package" management system hardcoded in the syntax, but most syntax looked like a re-arranged C. Were they able to keep it that simple? (no grotesque objet orientation or those horrible templates or garbage collector or hardcoded weird and expansive memory allocation model).
The pb is C syntax is too already too complex. I wonder if rust suffers from the same issue, hope they "fixed" C: only sized types, no integer promotion, no implicit cast (except for void*), compile-time/runtime casts (without that horrible c++ syntax), only 1 loop keyword, no enum/typedef/_generic/etc, etc.
- School-Cotton 4y agoI don’t know what you mean by strings embedded in Rust syntax nor package management (unless you mean crates and modules, which are basically just namespaces; the only “package management” is done by higher-level tools like Cargo). To answer your other questions: no, Rust has neither garbage collection, nor templates. I don’t know what you mean by hardcoded weird and expansive memory allocation model; Rust’s is basically the same as C++’s.
- sylware 4y agoIt was crates and modules, ok then it was weird namespace system. But I clearly remember "strings" being hardcoded in the syntax. So you mean rust has grotesque and absurd object orientation like c++ (or java)? Please, say no.
- School-Cotton 4y agoNo, it doesn’t. Why don’t you take the time to read a Rust tutorial rather than just assuming everything bad you can imagine about it and asking people to correct you?
- sylware 4y agoI was not keen on spending time reading rust syntax specs the moment you said rust is actually c++.
- School-Cotton 4y agoWhen did I say rust is actually C++? I said its memory allocation model is the same: normally done in containers or smart pointers, but malloc and free are still available under the hood if you really need them. Many other things about rust are extremely different from C++.
- sylware 4y agoOk, now I see the semi-colon. So rust has heavy memory allocation implicit in the syntax (not meant only for the stack). I remember now I did not want that (like those horrible c++ new/delete). Thx to have refreshed my memory about rust syntax.
- School-Cotton 4y agoIt's very unlikely you would ever have to use something like C++'s new/delete in Rust unless you are doing something like re-implementing the Vec class.
- sylware 4y agoIn c++, it is not only with new/delete, heavy allocations do happen implicitely everywhere. Now, I recall I did not want that. thx anyway.