3 ms·
Auto-completion aka -suggestion. Te first argument is usually a variable already declared one more more lines above your cursor, so you can start with that. Th
by qznc 13y ago
Auto-completion aka -suggestion.
Te first argument is usually a variable already declared one more more lines above your cursor, so you can start with that. Then your IDE kicks in and gives you a list of possible methods. In this case it is easy, if you want to use "length" or "size" for your list.
- fauigerzigerk 13y agoI see no reason why the IDE couldn't do that with multimethods. The trigger might have to be a little different but otherwise I see no issues here.
- newgame 13y ago> The trigger might have to be a little different The "dot-autocompletion" has a pretty good usability in my opinion. You write down the name of the variable, enter a dot and you get a filtered list of methods that "make sense" to call on the receiver (key word: discoverability of the API). How exactly would one implement the trigger with multimethods? I think this is an important consideration to make from a usability standpoint.
- jlarocco 13y agoCould swap the function name and argument list, so DoSomething(x,y,z) would become (x,y,z)DoSomething. I admit it's a little weird, but not so weird people couldn't get used to it.
- arethuza 13y agoIt's not that weird - you've pretty much described what a function call would look like in a language that uses Reverse Polish e.g. PostScript x y x DoSomething However, I don't think I've seen an IDE for PostScript or Forth
- Pxtl 13y agoBut then we've lost another level of discoverability - putting the method name first also gives you information about the arguments for the method.