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