StringReplacePart["StringReplacePart","At",{14,17}]
... Surely you can't be serious? ...
Naming Matters: I think what and how we call things is underestimated since not only does it immediately impact on codes` readability (or decipherability?), recallability and autocompletability but on deeper and growing connections between natural language and literate programming.
It has long puzzled me why, for example, ReplacePart
was not named ReplaceAt
. Three ovearching principles relevant to finding a good name - Expressibility, Brevity and Consistency, often represent competing tensions but for mine, ReplaceAt
has got ReplacePart
covered on all three criteria. Of course, there may be some semantic sense, or logic I have overlooked but even the process of considering the principles behind System
naming can, I think, improve one's own programming and efficiency. This question delves into the principles behind System
names (with a focus on linguistic senses) while this answer gives some tips on user-defined names (in the broader context of what pitfalls to avoid) but I'm interested in further criteria that combine both.
While acknowledging the personal preference and potentially discursive nature of this question, my sense is that it would nonetheless be useful to posit a considered naming convention that while not absolute could still be usefully followed in the main. I'm looking for (<9) principles/rules/guidelines/tips for naming variables/functions (and which might encompass factors such as comparison/distinction with System
functions, use of "palette symbols", linguistic/grammar sensibilities, length, capitalizations, context, user-experience, frequency etc). Naturally, answers themselves exhibiting Expressability, Brevity and Consistency will be preferred.
... Well yes I am (and don't call me Shirley ... with apologies to Dr. Rumack)
Experimental`MindAlteringDrugs`
? What is the question here? $\endgroup$StringReplacePart
would beStringYoureFired
. Regards, D. Trump. $\endgroup$ReplaceAt
to perform aReplace
operation "at" a particular position, whereas I would expectReplacePart
to directly replace a particular part of of an expression. So at least at first blush your simplification would add confusion, IMHO. A complicated issue to be sure but I'm not sure it can properly addressed on this site. $\endgroup$