Chad Perrin: SOB

29 July 2009

Language Deathmatch: Basic vs. Logo

Filed under: Geek — apotheon @ 05:17

(addendum: I’ve also written Language Deathmatch: Small Basic vs. UCBLogo, for those who are interested in my take on such an implementation vs. implementation comparison.)

Google has announced the development of a BASIC variant called Simple, aimed at being an LFM, and intended for use in Android development. My initial reaction was “Why BASIC?” This feels surprisingly like a case of those who are ignorant of history, or at least in denial about it, being doomed to repeat it. Why use a crappy LFM reputed for its encouragement of bad habits, instead of one that is also clearly an LFSP?

(For more about the difference between LFMs and LFSPs, you could take a break from this to read Michael Vanier: LFM and LFSP. If you already need a break from this, though, there’s something wrong.)

A few people in reddit discussion disagreed with me, but that’s not exactly a very good venue for developing a clear comparison of BASIC and Logo for the purpose of demonstrating the unsuitability of yet another BASIC variant for educational purposes when better options are available.


BASIC, influenced by ALGOL and FORTRAN, was created by John George Kemeny and Thomas Eugene Kurtz to serve the purpose of an educational programming language for people who weren’t science students. In the 1980s, it shipped with quite a few home computers, and was as a result the first programming language many people — including me — encountered and used.

Initially, there was not much of a natural learning path from BASIC to other languages. In the ’80s and ’90s, however, some more powerful descendants of BASIC have been developed, most notably including Microsoft’s Visual Basic.


The LISP family of languages — including Scheme and Common Lisp — also includes Logo. Where Common Lisp never pretended (as far as I’m aware) to be anything other than a language for experts, Scheme was created specifically as both a simplified notation for demonstrating principles of computer science and a practical programming language that can be used to get Real Work™ done. Beneath the level of Scheme, however, lies Logo, which was specifically created as an educational language for children.

The inventor of Logo, Seymour Papert, said in Redefining Childhood: The Computer Presence as an Experiment in Developmental Psychology, that:

[M]ore important than having an early start on intellectual building is being saved from a long period of dependency during which one learns to think of learning as something that has to be dished out by a more powerful other. Children who grew up without going through this phase may have much more positive images of themselves as independent intellectual agents. Such children would not define themselves or allow society to define them as intellectually helpless.

Logo was designed from the very beginning as a means of not just handing data to children and expecting them to memorize it, but giving children the tools of autodidactism and helping enable them to explore new concepts and learn new things for themselves. That’s a pretty good beginning, I think. In addition to that, however, there is also a natural path of progression from Logo to Scheme or Common Lisp, and the wealth of excellent computer science texts and classes that use Common Lisp and especially Scheme as tools of learning ensures that there’s always more to be learned with a minimum of additional preparation by moving to a drastically different, more capable language.

Even better, there are dialects of Logo itself that are suitable for much the same uses as Scheme and Common Lisp (though they tend to lack library support). UCBLogo in particular is a stand-out example of excellence, going so far as to provide even metaprogramming macros, and is far from the only Logo dialect to do so. Logo has also been adapted to other uses, such as LEGO Mindstorms programming — and what’s more educationally encouraging in a programming language than the ability to program your LEGO blocks?

Logo’s initial design was optimized for use controlling robots, including a device called a “turtle” that could be made to wander around on the floor drawing lines like a particularly high-tech Etch A Sketch. Since then, a turtle graphics feature has been added to most Logo implementations, allowing the educational value of the turtle to be included with Logo even where a physical turtle is impractical, adding an even more immediate educational feedback capability to the language implementation.

In some respects, unfortunately, Logo has been a victim of its own success as an educational language aimed at children. It is, in fact, a better designed general purpose language than many languages that have been used professionally by adults for many years, but it is still regarded largely as a “toy” that’s only suitable for children. Turtle graphics in particular has been both a great boon to people who wish to introduce children to programming concepts and a limiting factor for the recognition of the Logo language itself, as most people who have heard of Logo seem unable to even distinguish between turtle graphics and the Logo language itself.


Truth be told, I can’t even think of anything bad to say about Logo. It even manages to overcome the common complaint about LISP languages by being less cryptic in the names of its language primitives, and in eschewing parentheses for simple operations.

Meanwhile, famous computer scientist Edsger W. Dijkstra has had some well-known harsh words to offer about BASIC, in EWD898: The threats to computing science:

I think of the company advertising “Thought Processors” or the college pretending that learning BASIC suffices or at least helps, whereas the teaching of BASIC should be rated as a criminal offence: it mutilates the mind beyond recovery.

He has said so on more than one occasion. In EWD498: How do we tell truths that might hurt?, he said:

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.

This may be a bit of hyperbole (at least I hope so, for my own sake), and he has had similarly scathing things to say about APL, COBOL, and FORTRAN. One might wonder if he just hates languages whose names are acronyms or initialisms.

Still . . . if his intent was to point out that BASIC suffers some deeply troubling issues — particularly as an educational language — he’s right. He’s especially right when BASIC is compared to other possibilities, such as Logo.

Some comparative benefits and detriments of each language follow:

  • Turtle graphics capabilities give Logo a significant advantage over BASIC for a low bar to entry.

  • Old-school BASIC is a line-oriented programming language that doesn’t just fail to provide any more advanced capabilities for students who have moved beyond the most simplistic early stages of learning to program, thus limiting the amount of continuous progress one can make before having to change tools, but even specifically encourages bad programming practice. The addition of arbitrary labels to make goto statements easier to use is far from an ideal way to teach people to program well.

  • A good Logo implementation, as an effectively feature-complete LISP, scales upward indefinitely. Aside from specific descendants of BASIC that are not even recognizably BASIC any longer, BASIC doesn’t scale up at all, really.

  • The complete inability to avoid doing anything in a global scope in early BASIC dialects is substantially limiting, to put it kindly.

  • Visual Basic, despite being an unrecognizably modified variant of BASIC, still suffers serious shortcomings (yes, some of those have changed in recent versions, but other problems have arisen). Worse yet, in order to solve the problems of more primitive, older dialects of BASIC, it has utterly ceased to be an appropriate tool for education of young children.

  • To “solve” the problem of modern BASIC descendants that are unsuitable to use as educational languages for children, Microsoft has come up with Small Basic. It is indeed a greatly simplified language, easy for young people to pick up quickly, but it has unfortunately reached that point only by having most of the benefits of other modern BASIC descendants cut out of it.

  • Logo to Scheme and/or Common Lisp provides a more natural growth path than BASIC to any modern BASIC descendant that is actually good for anything in the Real World™.


I think that pretty well sums it up. I’ll add additional notes if I get any comments that warrant inclusion. As things stand, though, I can’t think of a single reason to favor BASIC over Logo as an educational language.


  1. At first, I misread and thought that this was about Small BASIC, a BASIC variant that Microsoft just released as a teaching language. Oddly enough, it too shares the “moving turtles around” idea. Sometimes I wonder if there is some technical reason why “teaching language” must always seem to mean “LOGO knockoff” to folks.


    Comment by Justin James — 29 July 2009 @ 07:28

  2. The worst thing about starting with imperative languages is that they teach bad practices from the start. When i first learned BASIC, one of my first hurdles was understanding that X = X + 1 is not declarative. I could have pretty easily learned functional programming at that point, but instead I had to “mutilate” my understanding of programming with an implied “LET”.

    Comment by Chip Camden — 31 July 2009 @ 08:51

  3. @chip camden: That’s your big complaint? In the scheme of things (no pun intended) the overloading of “=” as both assignment and comparison is small, no, microscopic potatoes.

    If that caused you trouble, you’re simply not smart enough for your opinions about languages to be valuable.

    I don’t think it did cause you trouble though.

    Granted, BASIC, as it was (the only way I’ve known it) back then was not good. But complaining about “=”?

    C has the same “problem”, as does C++, and many many other languages.

    If you have a beef with imperative languages, this cannot seriously be it.

    If find most beefs people have with imperative languages to be be mostly bogus. There’s a reason the early languages were all imperative. It is the most natural way for a person to describe what it is that need to be done. The other ways are interesting, but imperative ways are not intrinsically bad. And certainly, pointing at the use of “=” as an assignment operator and calling that a criticism is just plain idiotic.

    Comment by stevec — 31 July 2009 @ 10:31

  4. This wasn’t so much as a “Language Deathmatch” as an episode of “I Love Logo”.

    I would have at least expected a comparison of Turtle Graphics in SmallBasic vs Logo. And a good review would have at least mentioned that SmallBasic has built-in web access for stuff like downloading and displaying flicker images.

    On the old-school side, people gave up using goto’s in BASIC when QBASIC added real functions. This was literally decades ago, and yet I don’t even see QBASIC mentioned.

    As for Visual Basic, why cite an article from 2000? That was four versions and a major platform shift ago. Considering version 9 is free, why would schools bother paying hundreds of dollars for version 6?

    And how about a nod to the many non-Microsoft versions of BASIC? There are some that make Java’s “cross-platform” capabilities look like a joke.

    Comment by Jonathan Allen — 1 August 2009 @ 12:22

  5. Jonathan –

    One correction, this article was about Google’s “Simple BASIC”, not Microsoft’s “Small BASIC”. That may make a big difference, I haven’t looked at “Simple BASIC” at all, but from the information in this article, I suspect that it looks a lot more like current VB.NET (or Small BASIC) than oldschool BASIC.


    Comment by Justin James — 1 August 2009 @ 06:50

  6. stevec:
    1. I don’t see how a particular language characteristic being a stumbling block for someone means someone isn’t smart. I think the problem here is that you lack sufficient ability to see things from someone else’s perspective to grasp how other people might run into different conceptual stumbling blocks than you — which means this is your failing, and not his.

    2. I think he brought that up as a single example of a broader problem, rather than simply saying it was the sum total of what’s wrong with imperative languages. It’s ironic you’re claiming other people must not be very smart based on the fact you didn’t understand the point these other people made.

    3. I don’t think that an imperative approach is necessarily the “most natural” for everyone. The fact it (evidently) was so for you does not necessarily mean it is for other people. For instance, I’ve discovered that my own natural manner of thinking about things tends toward lazy evaluation, which certainly doesn’t fit into an imperative paradigm. Maybe you just have an authoritarian impulse that matches up with an imperative approach to dealing with the world.

    Jonathan Allen:

    I would have at least expected a comparison of Turtle Graphics in SmallBasic vs Logo.

    Why? Turtle graphics is mentioned as a benefit, in general, and it’s pointed out that it exists by default in Logo. It’s only included with dialects of BASIC in very exceptional cases. It’s not like this is actually intended to be a review of specific implementations of either language. I accept that it’s a good thing for early programming learning to have a turtle graphics package with your educational language of choice, regardless of what language that is.

    And a good review would have at least mentioned that SmallBasic has built-in web access for stuff like downloading and displaying flicker images.

    Just in case I didn’t make myself clear: this isn’t a review of Small Basic. Its intent is to address families of languages, particularly as originally conceived and implemented, and not to review Small Basic in particular.

    This was literally decades ago, and yet I don’t even see QBASIC mentioned.

    Tell ya what — you write specific reviews of specific implementations somewhere, and I’ll link to it. How does that sound? You can write about QBasic, GW-BASIC, Visual Basic for Applications, Apple BASIC, FreeBASIC, Applesoft BASIC, Commodore BASIC, Business Basic, Atari BASIC (my first programming language), Small Basic, Visual Basic, PowerBasic, UCBLogo, LEGO Minstorms Logo, MSWLogo, FMSLogo, Apple Logo, MicroWorlds Logo, NetLogo, Logo3D, TurtleTracks Logo, E-Slate Logo, StarLogo, ObjectLogo, and Imagine Logo to your heart’s content. I promise I won’t post comments excoriating you for the crime of not writing about the specific topic about which I would have written.

    As for Visual Basic, why cite an article from 2000?

    It was available. These days, people tend to just say “Visual Basic sucks,” and move on, without providing any detail. If you know of more recent treatments of the subject that are worth a damn, please let me know. Did you notice that I asked readers to do exactly that at the end of this SOB entry? I said:

    I’ll add additional notes if I get any comments that warrant inclusion.

    . . . but you, apparently, are just looking for someone to flame.

    And how about a nod to the many non-Microsoft versions of BASIC?

    Why exactly do you want me to write advertising copy for various versions of BASIC?

    Comment by apotheon — 1 August 2009 @ 08:53

  7. […] comments following Language Deathmatch: Basic vs. Logo, Johnathan Allen complained that I compared the Logo family of languages to the BASIC family of […]

    Pingback by Chad Perrin: SOB » Language Deathmatch: Small Basic vs. UCBLogo — 3 August 2009 @ 11:24

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

All original content Copyright Chad Perrin: Distributed under the terms of the Open Works License