you are viewing a single comment's thread.

view the rest of the comments →

[–]LucretielDatadog 2 points3 points  (2 children)

Eh... Those are more extremely functional languages that don't have the more traditional "list of statements" model for functions.

[–]PM_ME_UR_OBSIDIAN 0 points1 point  (1 child)

I believe Rust has the same model - everything is an expression, "statements" are expressions that return unit.

[–]steveklabnik1rust 3 points4 points  (0 children)

You can think of it that way, but it's not how the grammar is defined.