On Tuesday, 28 January 2014 at 11:26:39 UTC, Regan Heath wrote:
No, you really don't.

If you're writing string code you will intuitively reach for "substring", "contains", etc because you already know these terms and what behaviour to expect from them. In a generic context, or a range context you will reach for different generic or range type names.

Trusting intuition is not acceptable. I will go and check in docs in most case if I have not encountered it before. Check each time for every new aliases. I'd hate to have this overhead. Right now all I need to do is to stop thinking about strings as strings - easy and fast.

What could have been awesome is to be able to define such aliases via DDOC so that IDE's can understand them and list in auto-completion, while still putting "real" name in source code. It would have solved discoverability issue without harming naming consistency.

I think I would dislike this.. not sure. Do our docs have "synonyms" in function descriptions.. then at least google would find "contains" on the page next to canFind and you would have an answer.

They don't have it right now and I propose to introduce it for this very reason.

Reply via email to