On Tuesday, 24 March 2015 at 23:07:29 UTC, Vlad Levenfeld wrote:
You'd also have to rename opDollar to opHash or, maybe less confusingly, opPound.
opLength?
Also, $ is already a common idiom (at least in Unix) for "the end". It would be better to just name
No, in Unix "$" is used in /bin/sh for the prompt and to denote a variable, but "$#" is used for the number of parameters and "${#variable}" is used for length. What you are thinking about is that "$" is used for pattern matching of the conceptual EOL-symbol (character) in regular expressions, but that's not length. So in the Unix world "$" is either used for variables or pattern matching, and "#" is used for length.
In perl "$#" is used to denote last item in list? In Lua "#" is the length operator? Using "$" for length is just confusing if you know other languages.