How about "auto" parameters?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Fri Jun 3 11:13:08 PDT 2011


On 6/3/11 12:22 PM, Matthew Ong wrote:
> On 6/4/2011 12:36 AM, Matthew Ong wrote:
>> On 6/3/2011 11:16 AM, Mehrdad wrote:
>>
> Alternatively, D might want to use some kind of voting tool online on
> yahoo to help vote for syntax that programmer really wants.
> A simple solution to the long like JCP process in Java.
>
> If the aim is to grow D into a large community, popular hated syntactic
> sugar counts!!! Plain old fact.
>
> How did people in Java overcome the need of new syntactic sugar and
> still keep the some original bytecode design?
> See this URL:
> http://www.javac.info/closures-v05.html
>
> Example. The variable declaration
> {int,String=>Number throws IOException} xyzzy;
> is *translated into*
> interface Function1<R,A2,throws E> { // system-generated
> R invoke(int x1, A2 x2) throws E;
> }
> Function1<? extends Number,? super String,? extends IOException> xyzzy;
>
> Original syntax kept, original binary generated is also kept. No changes
> to the JVM and NO changes to the API.
>
> Just overcome that with the compilation and linking process. Just a
> 'simpleton' suggestion, yes?

Although I'm sure you don't mean it, this is a manipulation because it 
vaguely associates your argument with an obviously good example. Then by 
extension that implies that your argument has value on its own.

The above is called lowering, and D uses it extensively. "lowering" is 
present in TDPL's index with five referring pages. The value of 
syntactic sugar is understood and we provide it to the best extent we 
can. That doesn't mean any suggestion for syntactic sugar is good, and 
it doesn't mean that not accepting such is a sign of narrow-mindedness 
of the community.

> Just ensure someone filter the list on new feature, so that it will meet:
> to consistently *do the right thing* within the constraints it chose
>
> My dear 'friends', this is like deciding what is the best official
> language in a world conference. Not possible.
>
> IT world tried once with XML protocol and look at the end results?
> Not a total failure, but went further and further away from that
> original goal.
>
> Then JSON, BSON, YAML... so on and so on...
>
> Did Java XML talk transparently with C# or C++ XML?
>
> See a software developers common thinking pattern here?
> D need to open up and tries to see how to pick the syntax people
> like.
>
> I am just citing an example in english, it could have been
> french/spanish/...
> I am sure, before poetry format are created in the past for english
> language, the same content can be communicated via point form sentences.
> But poetry is formed because it also communicate more beautifully,
> emotion can be attached to the content?
>
> That my 'friend' is the syntactic sugar in the human language.
>
> Hopefully you understand what the current direction of the programming
> language seems to be going?

Mehrdad made a sensible suggestion, and just as sensibly understood the 
issues that surround it. The fact that you refuse to do so, and instead 
are falling increasingly in a self-reassuring pattern, does not speak 
well about your competence. If I were you, I'd abandon this increasingly 
disorganized rant, and thought of how I can improve the quality of my 
proposals and contributions.


Thanks,

Andrei


More information about the Digitalmars-d mailing list