Proposal request: explicit propreties

Ary Borenszweig ary at esperanto.org.ar
Tue Apr 1 23:10:08 PDT 2008


Lionello Lunesu escribió:
> 
> "Ary Borenszweig" <ary at esperanto.org.ar> wrote in message 
> news:fsti15$a9s$1 at digitalmars.com...
>> Lionello Lunesu wrote:
> It appears that in both cases the user has knowledge whether the member 
> should be assigned or invoked. The IDE will simply suggest "title" or 
> "run" and pressing "=" or "(" key will finish the job, yielding either 
> "title=" or "run(".
> 
> Unless you mean the IDE should have suggested the "=" and "(" as well, 
> but I have never seen an auto-complete that suggests more than just the 
> name. And it sounds like it shouldn't suggest more than that; what if I 
> want a ptr to member function?
> 
> My suggestion for a user setting applies to getters. There, when the IDE 
> shows a suggested function/getter, pressing ";" will finish the line and 
> optionally add a pair of ().
> 
> L.

Those are great suggestions!

Eclipse for Java (JDT) suggests you more than the function of the name: 
it writes, for example:

String s = ...;
s.substring // <-- autocomplete!

and you get

s.substring(start, end)

with "start" highlighted, so if you start typying, you overwrite 
"start". If you press tab, the focus goes to the next parameter ("end" 
in this case), etc. I find if very comfortable not to have to type those 
"(", ",", ")". But... in Java you can't have pointers to functions. But 
I think in those cases for D, the IDE can more or less figure out that 
the user wants just the name: if it is assigning it to a function 
pointer or delegate (but this is not true all the time).

Anyway, I liked the "=" and "(" method of distinguishing property vs. 
method. I'll try to implement it. :-)



More information about the Digitalmars-d mailing list