John Leehey
John Leehey

Reputation: 22240

Who decides which features make it into a language?

I have an idea for a language feature:

In C#, it would be useful for me to be able to combine a foreach statement with a for loop, to run through say only a maximum of 50 items. I realize that this can be done like so:

int count = 0;
foreach (item in Items)
{
    if (count > 50) break;
    item.acknowledge();
    count++;
}

but I think it could be nice if it could be written like so (or something similar):

foreach (upto 50 item in Items)
{
    item.acknowledge();
}

While this suggestion is pretty trivial, it makes me wonder who gets to decide which language features make it into a language. C# was pioneered by Microsoft, so I'm sure there's a department for that within the corporation, but what about open source languages like PHP? (does java count? I know they have switch strings coming in java 7, who was responsible for that?) Whats the process?

Upvotes: 2

Views: 134

Answers (3)

itowlson
itowlson

Reputation: 74822

The process depends on the language. Java, for example, has a specific and formal process for ratifying language (and I think core library) changes: the Java Community Process based around proposals called JSRs. (I am not sure if this has changed since the Oracle acquisition; I'm not personally familiar with the JCP.) With Microsoft languages such as C#, Visual Basic and F#, the gatekeepers are the language design teams within Microsoft (as faester indicates). These teams get input informally from customers, but also more formally through programmes such as MSDN Connect and the Microsoft MVP programme. Then again you have communities like Python where the discussion and design process are more open (e.g. conducted on mailing lists) though in Python's case there remains a final authority, Guido van Rossum.

So if you ask "who decides" in isolation, there isn't really any one answer. You have to ask "who decides for language X?" really.

Upvotes: 2

faester
faester

Reputation: 15086

I guess most languages are constructed by people who - like you - have certain feature requests that has grown from working with existing languages. Anders Hejlsberg from C# has been working on both Delphi and Turbo Pascal earliser which certainly must have given some inspiration to C# (he actually also expresses some regrets of not being able to remove features once they have been put into the language, but that's another story.) In the case of major languages I also guess the language designers read SO and similar places to get ideas and inspiration. Smaller (and cooler?) languages like clojure seem to arise as a response to certain demands which causes some of their popularity: Clojures immutable collections and elegant handling of concurrency are certainly a response to multi cores etc.

Upvotes: 1

Tejs
Tejs

Reputation: 41256

You CAN already do that in C#.

foreach(var item in Items.Take(50))
{
    // Do Stuff
}

Honestly, adding features to a language usually involves seeing a very large and unserviced gap in functionality that can't be fulfilled by a client library.

Upvotes: 0

Related Questions