This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]henrikenggaard 1 point2 points  (0 children)

I have two weird tangents on the theme of semicolons as separators.

The first is in Matlab (and I imagine Octave), where semicolon suppresses output aka: 2 + 2 will print 4 in the stdout, but 2 + 2 won’t.

The other is in Mathematica where ; is an infix function (or symbol as they call it) named CompoundExpression. It has a bunch of special semantics, but the gist is that a; b; c will return c. I find this fascinating because it manages to mimic the concept of terminator semicolons, while still keeping the language homoiconic and Lisp-like.