3 ms·
Curious whether any modern programming languages use these sequences for that meaning, beside ALGOL which they were intended for. Only one I know of is TLA+ (w
by colanderman 5y ago
Curious whether any modern programming languages use these sequences for that meaning, beside ALGOL which they were intended for. Only one I know of is TLA+ (which also uses standalone \ for set complement).
- vincent-manis 5y agoI do know that some ALGOL 68 implementations used \/ and /\. Not sure if there are any modern systems that do. Of course nowadays we can use the Unicode ∨ and ∧ symbols if we want to (though in the font I'm typing this in, the former can too easily be confused with v).
- ceceron 5y agoMiniZinc language for Constraint Programming uses /\ and \/ as AND/OR operators.
- Someone 5y agoIs BCPL modern? :-) I looked at https://networking.ringofsaturn.com/Web/syntax-across-languages.php#BlnsLgcOrAnd https://networking.ringofsaturn.com/Web/syntax-across-langua..., which is a great resource, but doesn’t even mention Algol in that section.
- adrian_b 5y agoIn 1964, the language IBM NPL, renamed PL/I in 1965 and known now under this name, introduced the symbols "&" and "|" for logical "AND" and "OR", replacing the keywords ".AND." and ".OR.", used by IBM in their previous programming language, Fortran IV. Because the symbols used by IBM were available in all later character sets for computers, unlike the traditional mathematical symbols, almost all programming languages introduced after 1965 have used either the IBM symbols or symbols derived from them ("&&", "||"). The use of backslash was suggested at about the same time, but the PL/I alternative of using a single dedicated character was more convenient. Unlike PL/I, IBM APL\360 used the traditional logical symbols, like Algol, but APL used a special character set anyway, so 2 more or 2 less special characters did not matter.