[Pharo-users] Better Code Completion

stepharo stepharo at free.fr
Mon Oct 5 16:21:31 EDT 2015



Le 4/10/15 23:53, Peter Uhnák a écrit :
> This is both rant and list of questions/notes/observations...
>
> ...but first of all:
> do Smalltalkers not like code completion? Because the one in Pharo is 
> really poor and not only that nobody is doing anything about it, *but 
> also nobody is complaining*; this leads me to believe that you either

No I'm complaining all the time but it is useless when we did have 
ressources.
In addition we did not work  on it because a student from delft was 
planning to work on it but he went to the US.

> a) don't have the manpower (this is true pretty much always, so no 
> complaints here)
This one.


> b) don't care about this that much (since you lived without it for 45 
> years)
>
> at least from the lack of complaining to me it seems that b) is more 
> likely scenario...
no
> But since I do use it, I get annoyed by it quite a bit, especially 
> since I regularly work in IDEs where this thousand times better.
>
> Now I would like to get things moving a bit (or bury it and forget 
> it), so I have couple of questions and would appreciate if someone 
> could provide some feedback.
>
> 1. Methods of core/top classes should be deprioritized

I do not get what you mean

>
> Since Object has almost 500 methods whatever I will start typing 
> Object/TClass/TBehavior/... will have a list of answers...
>
> so let's start typing...
>
>
>
>
>
> Very often I have to type almost full word to see what I want.
> Shouldn't the completion follow the inheritance chain? So first it 
> shows me matches from the class itself (especially since it actually 
> knows the type) and only after then it's parents and so on?
>
> 3. Or maybe even show the (closest) class that implements it.
> So the last two items would have somewhere (beginning or the end) 
> written '(Object)' and the first two '(yourself)' (or the class's name).
>
>
> 2. The window has fixed size, so if I have longer method (as in 
> picture above) I don't see it all.
>
> 3. Is middle-of-the word really that often used? See 
> moseIntere<sti>ngEntity above. It feels to me that it just creates a 
> lot of false positives (I have this problem also with inspector btw, 
> so I often have to prefix it with >># or if I see it already lot of 
> <arrow down>, which is annoying)
>
>
>
> 4. We write tests, however how often have you manually created an 
> instance of a test class by hand? I think they should be either 
> filtered or deprioritized as they create visual clutter. This is 
> probably also true for many other classes such as 
> ConfigurationOf/Manifest/... Nobody instantiates them by hand.
>
> 5. How often do you send #abs to a dictionary? Maybe also deprioritize 
> extension methods?
>
>
> 6. If I have already written part of the selector it's impossible to 
> "continue" and add an extra parameter. This is because it doesn't know 
> if I am code completing for dict, or #key.
> Maybe different shortcuts? <tab> to code complete on #key, and 
> <shift+tab> to code complete on the previous one... or maybe cycle 
> through them because this can be nested (the currently code completed 
> item would have to be highlighted somehow).
>
>
> 7. So if I don't want to see the above I have to type it manually; 
> which is fine for #at:put: but not for longer words.. (just to find 
> out ten seconds later that I have a stupid typo there).
>
> 8. The code completion doesn't show parameter names. This is very 
> helpful because it often reveals what it actually accepts. Now I have 
> to actually look into the code of the method.
>
> Now we can hardly compete with typed languages, but I think there's a 
> lot lot room for improvement.
>
> For comparison from other languages/IDE's.
>
> PhpStorm/PHP
>
> (notice how it shows the whole method if it's longer than the window 
> and doesn't it just clip)​
>
> NetBeans/C++
>
>
>
> In the picture above it ​still provides hinting when typing the parameter.
>
> TypeScript playground
>
>
> ​(similar to NetBeans)
>
> Also they have in their online playground better and nicer code 
> completion than we have in actual env 
> (http://www.typescriptlang.org/Playground )
>
> So if you have any thoughts/feedback/whatnot on this matter, I would 
> greatly appreciate it.
>
> Peter
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20151005/fa0b4c15/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 26762 bytes
Desc: not available
URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20151005/fa0b4c15/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 23158 bytes
Desc: not available
URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20151005/fa0b4c15/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 20884 bytes
Desc: not available
URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20151005/fa0b4c15/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 53119 bytes
Desc: not available
URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20151005/fa0b4c15/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 12529 bytes
Desc: not available
URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20151005/fa0b4c15/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 15492 bytes
Desc: not available
URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20151005/fa0b4c15/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 6680 bytes
Desc: not available
URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20151005/fa0b4c15/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 20214 bytes
Desc: not available
URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20151005/fa0b4c15/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 10717 bytes
Desc: not available
URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20151005/fa0b4c15/attachment-0008.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 6412 bytes
Desc: not available
URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20151005/fa0b4c15/attachment-0009.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 7047 bytes
Desc: not available
URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20151005/fa0b4c15/attachment-0010.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 4922 bytes
Desc: not available
URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20151005/fa0b4c15/attachment-0011.png>


More information about the Pharo-users mailing list