How about "auto" parameters?

Mehrdad wfunction at hotmail.com
Fri Jun 3 21:20:57 PDT 2011


== Quote from Andrei Alexandrescu (SeeWebsiteForEmail at erdani.org)'s article
> 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


Interesting... I just saw the continuation of this thread, and wanted to make some meta-comments (I guess this should be on meta.digitalmars.com, haha):


I admittedly didn't bother to check whether my suggestion was made before. Sorry. :(

Question: Why?

Answer:   Because it's really hard to search for it, and it gets really annoying past the Nth time you try to. The *only* useful way I know of for searching is to add "site:digitalmars.com" in
my Google query, which gets _really_ annoying to type after a while... and it doesn't help that the results aren't always on the mark (although it's hard to say anybody is at fault here). So I
just stopped bothering to do that a while ago (sorry) and didn't really bother checking whether my suggestion was already made.

But, on the other side of things, if I was on a newsgroup where newbies repeated the same suggestions over and over again, I'd get pretty annoyed myself. I think it's natural, and ultimately, a
lot of this boils down to the inability to search the newsgroup effectively (or perhaps my lack of knowledge on how to do that effectively, if I haven't found the right way to do it).

Ultimately, I'm not sure myself what the fix for this would be. The only thing I've found found to be AMAZINGLY useful is StackOverflow's automatic search based on the title (while you're typing
your own question), but that's not exactly easy to implement well, and I'm not sure if that's a reasonable thing to expect for this site, at least in the short term. I'm not sure what the
solution is, but _some_ easy way to search the newsgroups would DEFINITELY make duplicate suggestions by newbies less likely, IMHO.

Possible ideas for improvement:
1. Better searching on the newsgroup
2. Allow for categorization of posts somehow (although that's kinda against how newsgroups work, I guess...)
3. Something better that I can't think of



Again, I'm not blaming anybody or anything, just noting why duplicate and/or not-so-great ideas sometimes get posted (IMO).
Hope this feedback is useful. :)

Mehrdad


More information about the Digitalmars-d mailing list