News for hackers. Stuff that matters.
Re:The borrowchecker is what I like the least about Rust by johnnyanmac on Saturday July 19, 2025 @11:33PM (#44621754)
C++ is a stretch, but I sort of understand GP's point. I'm slowly learning Rust now and it feels like a deep evolution of C type syntax. Not dissimilar to Javascript in the most base sense of language constructs.

But you use it more and see actionscript types of function notation, funtional language semantics where you just "return" whatever was the last expression in a statement, how structs have no bodies (and classes aren't a thing) and instead everything is implemented externally, and it starts to really become its own beast.

Re:The borrowchecker is what I like the least about Rust by creata on Sunday July 20, 2025 @01:12AM (#44622168)
I didn't think it was that controversial a statement. For example, Wikipedia says:[0]

> Rust's syntax is similar to that of C and C++,[43][44] although many of its features were influenced by functional programming languages such as OCaml.[45] Hoare has described Rust as targeted at frustrated C++ developers...[15]

I'm not sure what "actionscript types of function notation" means, but Rust's closures syntax (|x| ...) was probably inspired by Ruby and/or Smalltalk. Anyway, sure, the expression-orientedness, implicit return, etc., are very un-C++-like, but I do think the syntax was explicitly designed to be approachable to C++ developers.

[0]: https://en.wikipedia.org/w/index.php?title=Rust_(programming...