3 ms·
Rust has quite C-like syntax IMHO, with a few important fixes. Types are easier to write and don't have typedef parsing gotcha. Array of 10 functions returning
by pornel 7y ago
Rust has quite C-like syntax IMHO, with a few important fixes. Types are easier to write and don't have typedef parsing gotcha. Array of 10 functions returning functions in Rust is `[fn() -> fn(); 10]`. I'd faint trying to write such type in C.
if (foo) bar();
is
if foo {bar();}
Same length, but without possibility of "goto fail" error.
Rust may look ugly, especially with generics, but on the technical level there isn't much wrong with the syntax. It's quite readable once you know it. And you can grep function definitions!