On Wed, 09 Nov 2011 01:20:44 +0200, Walter Bright <newshou...@digitalmars.com> wrote:

On 11/8/2011 9:37 AM, Gor Gyolchanyan wrote:
Polluting keyword space is not a good idea unless it's impossible to
interfere with identifiers.
If keywords used a special syntax, like starting with a special
character, then this wouldn't be an issue


The whole "too many keywords" issue strikes me as strange. English has over a million words in it. Who cares if a language uses 80 or 100 of them? What difference can it possibly make? How can an extra 20 words pollute the million word namespace (and not including any non-word identifiers (like inout))?

Another silly aspect of this issue is all keywords could be replaced by a sequence of special characters. For example, we could replace inout with ##. Voila! Less keywords! But is that better?

Keywords exist to make the language more readable. That's why we use inout instead of ##, and it's why we use + instead of add.

D is a rich language. That means it's going to have more syntax, more keywords and more symbols.

My only concern with keywords is that to me a keyword must lift its own weight, For specific issues such as this, if there is a library solution (which i think is not applicable here), or a solution which requires an overload to an already defined keyword, it would be IMO a better choice. I can see why we have a keyword for it, and why it is not @inout. I suggested "return" because it semantically fits the definition of inout. Yet, you are again right, i didn't think about neither local/variable usage nor tuple syntax.

Reply via email to