3 ms·
> I love that you are using colon for the assignment operator. This is absolutely correct. Historically, distinguishing an equality operator from an assignment
by AdieuToLogic 1y ago
> I love that you are using colon for the assignment operator. This is absolutely correct.
Historically, distinguishing an equality operator from an assignment one has existed for many decades. Whether using colon for the latter is "absolutely correct" is the subject of valid debate.
An equally compelling case could be made for any of the following assignment operators as well:
foo <- 42
foo -> 42
foo <= 42
foo => 42
foo <-> 42 if expressing substitutability is important
foo := 42 Pascal lives!
(foo 42) so does LISP!
foo is 42 for those who prefer English operators
f(foo) = 42 for mathematically inclined languages
Etcetera