by imdhmd on 11/18/13, 1:22 PM with 56 comments
by ibdknox on 11/18/13, 6:40 PM
by jonase on 11/18/13, 2:33 PM
by jcrites on 11/18/13, 10:23 PM
How does autocompletion work for Lisp-like languages? I'm wondering if the verb-subject ordering makes it more difficult to build effective autocompletion.
In languages with a syntax like C, code phrases benefiting from autocompletion focus on a particular thing in subject-verb-object order:
obj.method(param);
Consequently I can engage auto-completion by typing the following, where <cursor> is the location of the text cursor in the editor: obj.<cursor>
I type variable name and the "dot" (or equivalent), and the IDE can make informed suggestions about methods to show: methods defined on obj, or methods taking obj's type as their first input.When writing code, I usually know what object I'm working on (autocompleting the variable name is useful but not crucial, since it's usually on preceding lines). What I want to know, and the area in which autocompletion helps me most, is finding out what methods are relevant to that specific object (e.g. defined by the object).
When I'm writing quick prototype code, I use an approach that's almost like single static assignment:
A a = new A();
B b = a.foo();
C c = b.bar();
Using autocomplete, I can explore objects and methods while staying within the IDE. When combined with in-IDE documentation, writing new code is extremely effective.How do you effectively autocomplete in a Lisp language?
(<cursor>
If I type that, there's no object yet, so what autocompletions can show up? A list of all functions? (<cursor> obj ...)
If I type this line and move my cursor back to the first parenthesis, then it makes sense that autocompletion could understand the context, but moving the cursor backwards is inconvenient. It's not a fluent way to write code.I have not used autocompletion in Lisp-based languages. How do IDEs or REPLs solve this problem? It seems like a similar problem will affect pure-style functional programming languages like Haskell. Static typing is not the criterion, since Python has effective REPL autocompletion.
Does the lack of a natural opportunity to present relevant autocompletion information inhibit the development of advanced editors for these languages?
by dopamean on 11/18/13, 3:37 PM
by peatmoss on 11/18/13, 2:54 PM
by wuschel on 11/18/13, 3:40 PM
by owenjones on 11/18/13, 3:32 PM
It get's better with every release, can't wait for the finished product.
by lispm on 11/18/13, 8:22 PM
ftp://ftp.ai.sri.com/pub/mailing-lists/slug/930331/msg00240.html
by senand on 11/18/13, 3:21 PM
I hope that with the recent addition of plugins, LightTable will also be able to provide code inspection à la IntelliJ IDEA, since that's the feature I miss most.
by agumonkey on 11/18/13, 3:09 PM
by owenjones on 11/18/13, 7:38 PM
Even in the example given it's reduced the function to a 1 liner, I assumed because it was short enough that it's still legible. Is this trying to tell me my functions are too long?
by vorce on 11/19/13, 9:00 AM
by JPKab on 11/18/13, 2:44 PM
"Article that is actually interesting" 0 comments
This is awesome. Thanks for sharing.