2 ms·
Exclamation marks are also used in Ruby to differentiate between mutating methods vs those that return a transformed copy. So, `array.sort` vs `array.sort!`. Qu
by sixstringtheory 5y ago
Exclamation marks are also used in Ruby to differentiate between mutating methods vs those that return a transformed copy. So, `array.sort` vs `array.sort!`. Question marks are also used, but more aesthetically vs functionally: there are `array.empty?` and `array.include?` but no `array.empty` or `array.include`.
Swift allows unicode in symbols, so you can name functions with emoji. Thankfully that hasn’t caught on.
J has a similar idea–built into the language syntax vs using characters in function names–where a period can be used to inflect a primitive.