Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



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}, …




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: