3 ms·
"The future I imagine is a world in which programming is self-explanatory, where people talk to computers to build software. To get there, programming tools sho
by dkopi 10y ago
"The future I imagine is a world in which programming is self-explanatory, where people talk to computers to build software. To get there, programming tools should first use our language."
But is:
"For every button on the page that is a "warning" button, replace the background color to red."
Necessarily better than?
$("button.warning").css("background-color", "red")
- malux85 10y agoYes - it's miles better. If you're unconciously competant (i.e. good at your job) they might seem like they both take about the same cognitive effort to understand. But think for a beginner: What is $ ? Is it money? What are () for? What is CSS? I want to shade it, so lets do background-shade .. oh, color only works, so you have to know all the terms. Can I do "background-color" "red blue white striped" What is button.warning? Can I do button.border ? These are all questions a newbie could ask - because they have no experience in the "domain language"
- bbctol 10y agoThe questions raised was "better," not "easier to learn." In absence of everything else, being easy to learn is a point in favor of natural language--but the inefficiencies, ambiguities, and probable weakness of using natural language are big marks against it. Checkers is easier to learn than chess, but has fewer players.
- mrob 10y agoInform 7 is a programming language that looks similar to natural English. As far as I can tell the only benefit is tricking beginners into thinking it's easy. By the time they figure out it's a normal programming language only with extra verbose syntax, it's too late, they're already a programmer. If we had a real natural language based programming language it would have all the problems of law. Laws are written in a very formal style that takes a lot of training to understand, and despite this they contain enough ambiguity to support a whole industry of lawyers arguing about them. Making programming similar to law would not make anything easier.
- AnimalMuppet 10y agoFor a previous attempt at the same idea, see COBOL. The original design goal was to make professional programming obsolete.
- ktRolster 10y agoApplescript is worth looking at for the same reasons.
- douche 10y agoI used to mess around a bit with Inform 6 (they had a really excellent tutorial[1]). It wasn't great, but since it was basically C-like with some extra DSL stuff sprinkled on top, you could usually figure out what it was doing without too much effort. I tried to get into Inform 7, but the natural language syntax was so fuzzy, I was constantly trying to figure out how things worked and how I had to write things down to get the results I was trying to get. EDIT: Since guess-the-verb was sometimes half the battle with old Infocom games, I suppose its ironically fitting that the experience of writing IF with Inform 7 parallels that experience. [1] http://inform-fiction.org/manual/about_ibg.html http://inform-fiction.org/manual/about_ibg.html
- maxxxxx 10y agoI have to think of AppleScript "Tell xxx to yyy". That was a real winner :-)