Programming in English is a Bad Idea
Here’s a very cool insight from a reddit thread I was just just noodling through:
A programming language should never try be intuitive. Visual Basic tried to be intuitive. Applescript tried to be intuitive. Both wound up more confusing than they [should] have been. Programming just isn’t intuitive, there’s always a learning curve. Instead, good languages are consistent and make sense. Predictability is the best way to reduce (not eliminate) the learning curve.
I think there’s a notion out there that computer languages should be easy to learn, or easy to use, or whatever, and so you sometimes get languages with syntaxes that try to be as English-like as possible. The theory being that if you can program the way you talk, everyone will be able to program.
It doesn’t work, it never works, because programming is just intrinsically hard, and languages that try to paper over that difficulty with insipid abstractions or faux-familiar syntax just wind up muddying the water further. Programming languages should make it easy to express stuff the way you think about them, not the way you talk about them.
Because human language is intrinsically imprecise. It has to be: there’s no way to capture our cognitive landscape with words, which is why we often keep things vague, or use metaphor and symbol to get at fundamental but inexpressible truths.
That’s certainly no model for a computer language. When a program comes across something inexpressible, it doesn’t search for an extra-lingual abstraction to get around the difficulty. It dumps core.
3 Comments