Pg's theory behind o probably is that it doubles as an abbreviation for "optional" and as an easily recognizable small-circle sign. In practice however, I find myself always reading the o as "oh". (def foo ((o bar 12)) bar)
I read this as "def foo oh bar ...", and then I have to translate the "oh" into a sign for optional in a second step.The following syntax makes it immediately obvious that bar is an optional variable: (def foo ((bar? 12)) bar)
(Note that the question mark is not a part of the variable's name, only a sigil that indicates that it's optional.) |