Hacker News new | past | comments | ask | show | jobs | submit login

I 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.



> 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.


Could 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.


It'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


But then we've lost another level of discoverability - putting the method name first also gives you information about the arguments for the method.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: