Hacker News new | ask | show | jobs
by victorNicollet 3158 days ago
Interestingly, when using mathematics to describe the semantics of programming languages (say, operational structural semantics for an imperative language), the assignment tends to use an arrow, i.e.

S[ x ↦ V ]

indicates that the new state is equal to old state S, but with variable x now bound to value V.

1 comments

Most commonly I see a “substitution” notation for that, S[V/x], but unfortunately there are dozens of variations in use, including: [V/x]S, [x ↦ V]S, [x ⇒ V]S, [x → V]S, {V/x}S, {x ↦ V}S, S_(x → V), S[V|x], S[x := V], S[x/V], S[x ← V], S[V\x], S(v/x), S{V/x}, S{x ↦ V}, S{x := V}, S{x → V}, S⦃x ← V⦄, S{x ← V}, …