The Poetry of Function Naming—Stephen Wolfram Writings
For nearly 25 years, I have been deeply involved in designing Mathematica, focusing on establishing foundational principles and ensuring unity and consistency across the system. The culmination of Mathematica's capabilities is in its built-in functions, each requiring a precise and descriptive name.
As we approach the release of a new version of Mathematica, I've been engaged in final design reviews and the confirmation of function names. Naming functions is an art form, akin to abstract poetry, where the goal is to encapsulate a function's essence in one to three words. This process can be both easy and challenging, sometimes seeming obvious, other times requiring extensive contemplation to achieve clarity.
The right name often eludes us because it demands a complete understanding of the function's purpose. A well-designed function with a clear role is easier to name, and achieving this clarity can be immensely satisfying.
Function names in Mathematica are based on English and follow conventions and metaphors established by the existing web of functions. They must be immediately permanent upon introduction, unlike words in human languages that evolve naturally. This permanence is crucial as programs rely on these names, and Mathematica has maintained compatibility since its first version in 1988.
When naming functions, we leverage existing knowledge and aim for generality. The name should not limit the function's perceived applications, as it significantly influences how people think about and use the function. The texture of the name matters, with sophisticated functions having sophisticated names, and common functions having simple ones.
We strive to follow naming precedents to maintain system consistency and facilitate learning. A good name allows users to unpack it into a one-sentence description of the function's purpose. Despite our best efforts, perfection is unattainable due to the inherent complexity and limitations of language.
In cases where English lacks a suitable word, we resort to analogies and metaphors to extend Mathematica's linguistic base. However, we must carefully choose words to avoid misunderstandings due to multiple meanings in English.
After all the deliberation and refinement, we must settle on a definitive name that serves as a permanent handle for the function within Mathematica. This process encapsulates creative concepts in thousands of little poems, representing a significant investment of time and thought over the past quarter-century.
The original article: https://writings.stephenwolfram.com/2010/10/the-poetry-of-function-naming/