If anything I want more explicit control, alleviated with an even more expressive type system. Ideally rusts type system would just be a prolog variant imho.
https://en.wikipedia.org/wiki/Category:Compiler_optimization...
Otherwise we should trust compilers to know better.
There is already a crate providing parallel iterators. You just rename the iter() call and that's it. I don't agree it should be implicit though.
But to your point, the _defaults_ are very different. Things like raw pointer casts require a lot of ceremony and careful thought in Rust, and they have to follow more rules than in C. In particular, Rust references are all effectively "restrict", and it's really easy to screw that up when you do unsafe cast from raw pointers to safe references, which is a big incentive not to write code that needs to do that if you have a choice.
Whereas Rust is a standard with multiple implementations?
[1]: https://learn.microsoft.com/en-us/cpp/assembler/inline/inlin...
> Inline assembly is not supported on the ARM and x64 processors.
IIRC, the MSVC C/C++ compilers don't output assembly and then assemble that with an assembler; they output machine code directly for efficiency. It could be that inline assembly would require an assembly language parser that would have to be merged into the compiler and complicate the architecture, and they have no reason to do that unless enough paying customers request it.
Bash with types (especially floats), fewer edge cases, functions with explicit parameters, simple command line flags...
I guess I could avoid floats using multiplication, but I would rather keep the code as simple as possible.
I know it’s still not 1.0. Then just get fish. At least would save some keystrokes.
It's not really a "product" per se but there's an old version for download and some lightweight docs here:
We've never worked out what to do with it. Ideas and feedback welcome. It's pretty nice to use, albeit you need to use IntelliJ to edit scripts if you want IDE features.
Rust is quite transparent in what it does, and is very conservative with compiler magic. The language doesn’t do heap allocations, doesn’t do reference counting, it doesn’t even have implicit numeric type conversion. It won’t implicitly copy types that did not ask to be implicitly copyable, and even that is only legal for types that can be copied with a simple shallow memcpy.
Rust uses zero-cost abstractions all over the place, which means it’s predictable what code they will compile to, and that will be typically something simple. Std types have well-known basic layout, so you know that e.g. iteration over a Vec is going to be a loop incrementing a pointer, and there’s no implicit parallelism.
Describing borrowing as “compiler knowing better than the programmer” is a weird way of looking at it. Borrowing is like type checking. You declare a type to be temporary, and try to use it as long-lived, you get an error. It’s the same as if you declare function to return struct Foo, but returned struct Bar instead. Yes, compiler “knows better than you”, because you just wrote a bug.
Borrowing still compiles to direct pointer usage without a GC (it’s literally guaranteed to be identical to a C pointer in C ABI structs and functions), and you can override lifetimes with unsafe if you think know better than the compiler.