Hacker News new | ask | show | jobs
by kibwen 3909 days ago
What gives you the impression that it's complicated? I can assure you that Rust contains an order of magnitude fewer features than C++, and none of C++'s edge cases or C's footguns.
1 comments

Rust has a very powerful type system, and combining that with lifetimes makes for some crazy signatures that really hurt my brain.

The type system grows more powerful (and more complex) every time I revisit Rust, it seems.

I'm glad, as an increasingly powerful type system facilitates abstractions that were once painful, slow, unsafe, or impossible, but it is complex.

> Rust has a very powerful type system, and combining that with lifetimes

If you don't count lifetimes, Rust's type system isn't really more powerful or complex than, say, that of Swift. There are no dependent types here. There are no type families. There aren't even higher-kinded type parameters.

> The type system grows more powerful (and more complex) every time I revisit Rust, it seems.

What additions are you referring to?

I wouldn't say Swift's type system is particularly simple, I rather like it, but it does have a lot of complexities.

  > The type system grows more powerful (and more complex) 
  > every time I revisit Rust, it seems.
There have been no additions to the type system since well before 1.0. I'm curious where this perception is arising from.