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

There is a problem with the example he gives, of parsing “Create a window with a table view, and then when someone clicks a button, add an entry to the table view”. I think a future programming language could actually make a program out of that. I agree that there is not enough information in that sentence to be sure that the program is what the user wants, but in this case, the language can use a popular technique in programming: have defaults. For instance, most languages have a file I/O library. If you open a file without saying whether you want to read or write to it, the compiler doesn’t complain, it just chooses the default. If you realize the default isn’t what you want, you can change it.

Similarly, a future language could parse the given sentence as “put a single-column table view on the left, and a button on the right that says ‘Add an Entry to the Table View’, and when the button is clicked, just put the string Entry at the bottom of the table view”. And then the programmer tries this out and tells the programming language “no, I want the button at the bottom, and it should say ‘Add Person’”, and the language makes the necessary changes and follows defaults otherwise, choosing to left-align the button at the bottom rather than center it, and resizing the button to fit the text. And the programmer could just keep specifying more details about what a Person is, and how you edit it, and you can make a program in this way.

Basically, this is just like modern libraries: instead of writing your own HTML parser nowadays, you can use a library with a “default” (non-custom) way of parsing HTML. In the future, rather than specifying your GUI and attached code in exact detail, you can just use a library of defaults. It will probably be the case that programmers in the future would simply move on to bigger and harder problems than GUIs with code, as gaius mentioned at http://news.ycombinator.com/item?id=1641514, but I think programming at the level we know it actually will get easier.




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

Search: