4 ms·
To provide some rationale, the '!' syntax distinguishes declarations from imperative constructs or effectful statements. You will see similar syntactic sugar in
by turboponyy 4y ago
To provide some rationale, the '!' syntax distinguishes declarations from imperative constructs or effectful statements. You will see similar syntactic sugar in Haskell (do notation), F# (computation expressions), and probably others - they are often abstractions for specific monad-wrangling patterns, and won't look out of place for many in a more functional-style language.