Comment

Comment by phicoh

I think that is not correct.

One of the big differences between K&R C and C89 is the introduction of function prototypes. Strong typing was certainly considered positive for compiled languages. Of course C is a lot less strict than Ada.

If we compare the Rust subset that has similar functionality as C then there is not much difference. You get 'fn'. The is 'let' but Rust often leaves out the type, so 'int x = 42;' becomes 'let x = 42;' in Rust. Rust has 'mut' but C has 'const'. Rust introduced '=>' and removed '->' from object access and moved it to the return type of a function.

The C language has support for long variable names. Some early linkers didn't, but that's an implementation issue, people were certainly unhappy about that.

C++ started in the 80s. Objects were not controversial back then. The same applies to exceptions.

I don't have a metric for the size of a standard library. For its time, the C library in Unix system had a large number of functions. Later that was split in a C standard part and a POSIX part. But that was for practical reasons. Lot's of non-Unix systems have trouble implementing fork().

I have no clue what you mean with annotations. If you mean non-function annotations along with code, then generally Rust programs don't have those.

parent phicoh 6 months ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton