3 ms·
I typically code with the manual alongside my editor so syntax lookups are cheap. I prefer dumb and honest APIs coupled with good type systems so that understan
by wyc 12y ago
I typically code with the manual alongside my editor so syntax lookups are cheap. I prefer dumb and honest APIs coupled with good type systems so that understandable semantics are expressed within the routines themselves.
Therefore, I'm pretty apprehensive about using a system that seemingly encourages ambiguity, e.g. on page 6:
var epochMethodName = K.ask(clock, "what is the name of that's property (methodName) which represents the current time in Unix epoch format?").methodName
If the system is rigid and expects a structurally-similar sentence, then isn't that specification more difficult to remember than simple method names? This could form an unnecessary implicit schema, basically the same as winded function calls.
If the system is extended enough to understand a variety structures conveying the same meaning, what guarantees do I have about maintaining a consistent result? We developed a separate language for mathematics to (among other reasons) eliminate ambiguity, e.g. the exclusive or due to the ambiguity of the word "or". This reminds me of the Dijkstra paper on natural language programming that resurfaced on HN recently:
https://www.cs.utexas.edu/users/EWD/transcriptions/EWD06xx/EWD667.html https://www.cs.utexas.edu/users/EWD/transcriptions/EWD06xx/E...
I don't think within the code itself is the right place to help the computer make sense of my meaning. Such a complex system may mislead the user into thinking that the system is smarter or more capable than it really is, e.g. you can't tell a toaster to K.ask("what's your property (methodName) to bake a cake?"). How is natural language-based service discovery different than a lookup for all APIs implementing the cake-baking interface? I don't think I understand the bridge that the paper makes from natural-seeming language to formal logic.
Instead, I think something along the lines of this proposed system could useful when used while programming. While writing code, I would enjoy a way to look up "a method for this object that does something along the lines of XYZ". I would be interested in a more powerful search engine for documentation that leverages type systems and comment-search more usefully than just word-matching. Right now, the closest thing is Stack Overflow.