logoalt Hacker News

esafaklast Friday at 9:08 PM1 replyview on HN

Block expression https://doc.rust-lang.org/reference/expressions/block-expr.h...

Also in Kotlin, Scala, and nim.


Replies

IshKebabyesterday at 12:50 PM

I think this comes from functional programming. I'd just call it "everything is an expression" (which isn't quite true in Rust but it's a lot more true than it is in traditional imperative languages like C++ and Python).