Use of special characters in function names

Viewed 15997

In Ruby, a standard convention is to use a question mark at the end of a method name to indicate the method returns a boolean result:

[].empty?   #=> true 

Another standard convention is to end a method name with an exclamation point if the method is destructive (that is, it modifies the original data):

mylist.sort! # sort mylist in-place

Recently I have seen these same conventions used in Scheme. Which makes me wonder, what other languages use/support this convention? Are there any other special characters that are commonly used for naming by these or other languages?

4 Answers
Related