goombas.org
menu
main
links
all items
rss feed

Topics:
coding
games
goombas.org
horror
judgement
life
minutiae
music
rants
software
fool.
 _-
 oO
 |/
/|
/ \
Ugh, stop twitching
coding in english
coding Posted 2003-05-07 11:23:10 by Jim Crawford
There seems to be a common meme floating about, that designing a programming language so that it looks like English makes it easier to learn. In this essay, the author intends to demonstrate that this idea is fallacious.

There are plenty of lousy-yet-popular languages out there that are similar to English. This kind of language can be considered a subset of the English language -- that sounds pretty good, doesn't it? You already know it all, right?

Well, not really. You can approach such a language this from one of two directions: you can build up, from zero assumed knowledge, or you can cut down, from assumed knowledge of the natural language.

How feasible do you think the latter approach would be? There are dozens of grammatically correct ways to express the conditional statement “if x is equal to y then do z.” Only one will work in Subset-Of-English. And that's just at the syntax level -- before you even got to the details, you have to learn that you can't just ask the computer to “make the ball bounce.”

No, the only feasible approach to learning such a language is the build-up approach. In which case, what's the advantage of Subset-Of-English over a language with syntax that's designed from the ground up, specifically for programming?

There is one: it's easier for non-programmers to read and understand. This has probably led a lot of non-programmers to choose a language like this. But if you're going into programming, you're probably going to be a programmer a lot longer than you're a non-programmer. Wouldn't it be wiser to choose a language that's optimized to make life easier for programmers?

In conclusion, the author has demonstrated that it is fallacious to design a programming language to be similar to English in order to make it easier to learn.

By the way, on a syntax level, “making life easier” for programmers generally means making the code more concise. This is becauese concise code takes less time to type and less mental effort to parse.

[link to this] [See more on “coding”]

comments
not true! [note to non-programmers]
Posted by AdamMil on 2003-05-08 10:21:17
That's just not true! Compare these two programming languages:

Perl, a hacker favorite. Here's what you do in Perl if you want to print your name. I'll assume your name is Peter Barabas.
''=~('(?{'.('[,@.)}'^'+^)@]]').'"'.('[%*:^~<@[:<^(}'^'+@^_,^^!)[^?[_').'})')
Hackers just love that stuff. It must make them feel so superior. Now let's consider BASIC, an English-like language scorned and hated by hackers everywhere for its wonderful simplicity. This basic program does the exact same thing.
print "peter barabas"
BASIC may not be as "c00l" or "L33T" or "phAt" or whatever those hackers consider Perl to be, but I'll leave it to you to decide which is the better language.

Long live BASIC!!!
one of many many ways...
Posted by Anonymous (Benjamin S. Wiegele) on 2003-09-06 04:14:57
this is just one of so many different ways to print a string in Perl.
we could use
print "Peter Barabas\n";
as well...
coment:
Posted by Anonymous (http://zzo38computer.cjb.net/) on 2003-10-24 21:02:12
Actely, Perl and BASIC is both beter, but programming language so that it looks like English is no good. And I dont understand how the top perl things works. I tryd it, and it dus work, but I dont understand Perl anuf to understand wy it works.
add a comment
Only anonymous comments are available for now until I get the user system up and running again. Not many people were logging in anyway, so enh.
Permitted HTML tags: <b>, <i>, <u>, <tt>. Also permitted is the <q> pseudo-tag which is meant to delimit quotes from other messages.
name:
email:
subject:
body:
Preview
To prove you are sentient, please type "sentient" into this box

what's this?
This is Jim Crawford's blog. Details and contact information.

On Twitter: @mogwai_poet

recent comments
Packers and movers in Gurgaon (Anonymous on may 2014 microblog digest)
QuickBooks 24/7 Support Phone Number (Anonymous on may 2013 microblog digest)
no subject (Anonymous on may 2013 microblog digest)
no subject (Anonymous on boxing: a history)
QuickBooks Technical Support Phone Number @1844-640-1482
(Anonymous on may 2013 microblog digest)
phone number for quickbooks support (Anonymous on may 2013 microblog digest)
no subject (Anonymous on boxing: a history)
Accountancy (Anonymous on may 2013 microblog digest)
QuickBooks Technician (Anonymous on may 2013 microblog digest)
no subject (Anonymous on boxing: a history)
quickbooks support (Anonymous on may 2013 microblog digest)
Loved the game (Anonymous on boxing: a history)
no subject (Anonymous on may 2013 microblog digest)
no subject (Anonymous on may 2013 microblog digest)
Aol Tech Support Number (Anonymous on may 2013 microblog digest)
Comments RSS