Follow Slashdot stories on Twitter


Forgot your password?
Education Programming

The Value of BASIC As a First Programming Language 548

Mirk writes "Computer-science legend Edsger W. Dijkstra famously wrote: '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.' The Reinvigorated Programmer argues that the world is full of excellent programmers who cut their teeth on BASIC, and suggests it could even be because they started out with BASIC."
This discussion has been archived. No new comments can be posted.

The Value of BASIC As a First Programming Language

Comments Filter:
  • Fuck him. (Score:4, Informative)

    by OrangeCatholic ( 1495411 ) on Wednesday March 10, 2010 @03:28AM (#31423656)

    I was on Basic from 1986 to 1993, and it was the most meaningful years of my life.

  • Simplicity (Score:5, Informative)

    by azgard ( 461476 ) on Wednesday March 10, 2010 @03:31AM (#31423664)

    There's something to it. I recently downloaded a ZX Spectrum+ manual from (the colorful one), and was amazed by how simple the language is. The complete reference takes like 10 pages? And it can draw lines and circles..

    Now compare it with any modern language, such as Java or Python. The language description itself takes 10x more than that, and the libraries available are vast. I am not arguing it's a bad thing; I am just arguing that simplicity may be a key here.

  • by jpmorgan ( 517966 ) on Wednesday March 10, 2010 @03:45AM (#31423768) Homepage

    Indeed. Dijkstra was frequently wrong, especially when he made grand sweeping statements.

    GOTO is a good example, 'GOTO considered harmful' is practically biblical law amongst many programmers, but it's worth remembering that he made that statement in the context of an argument with Donald Knuth. Knuth won: (

  • Re:Time heals (Score:3, Informative)

    by julesh ( 229690 ) on Wednesday March 10, 2010 @03:46AM (#31423772)

    Depends on the BASIC. I use RealBasic at work as an alternative to LabView.

    RTFA. The author is quite clearly talking about non-block structured BASICs of the MS-BASIC kind.

    Am I the only person on the Earth who just writes off hysterical, panty-wetting stuff like this?

    Again, read for context. Dijkstra was being intentionally hyperbolic in a joke article when he wrote this. He did intend the point behind it, though.

  • by phantomfive ( 622387 ) on Wednesday March 10, 2010 @04:00AM (#31423836) Journal
    If you had read the article, you would know that you had just written a fairly decent summary of the author's main point.
  • by mccalli ( 323026 ) on Wednesday March 10, 2010 @04:05AM (#31423864) Homepage
    Yeah, there were no 'else' constructs. If you wanted an else, you had to do it yourself with a couple GOTOs. Also, the worst part about line numbers was when you decided to add something later, and there weren't enough lines. A program that had been refactored this way a few times could literally move randomly through the source code.

    I never owned a Beeb, though I had several friends that did. I used them at school a lot too, and their BASIC was extraordinarily advanced. The ELSE statement was there, as was the standar(ish) GOSUB, but you could also define true procedures which returned values etc. (DIM PROC), and there was a clean way of dropping down to the 'OS' proper (OSCLI statements).

    In addition, it also solved the line number problem you mentioned. It had a renumber command so that everything would become properly spaced out again. I remember the style of coding you're describing from my C64 efforts - the C64 was actually MS BASIC and it was dreadful, anyone wanting to do decent high-levle coding used to get the Simon's BASIC [] cartridge.

    As a whole though, the BBC simply had the best BASIC of any 8-bit I encountered. That's not too surprising given its background and use as a teaching tool, but they did it very well indeed.

  • Dijkstra ? Legend ? (Score:4, Informative)

    by vikingpower ( 768921 ) on Wednesday March 10, 2010 @04:12AM (#31423902) Homepage Journal

    Dijkstra, who taught at Eindhoven Technical University - which is how I superficially came to know him - was mostly a self-declared legend. He cultivated his own myth, even going as far as publishing a little book with his own quotes.

  • by AVee ( 557523 ) <slashdot AT avee DOT org> on Wednesday March 10, 2010 @05:04AM (#31424122) Homepage
    If, and only if, you're programming in a language which doesn't provide any constructs to do error handling. Dijkstra was right, goto's are a bad idea and should not exist in a language. Knuth was right, in the absence of something replacing goto you're better of using it then not using (if done properly).

    All of that discussion is passed us now, most of us have been writing software without using goto for the last two decades, goto has been replaced with try/catch constructs, labeled breaks, switch statements etc. None of the examples Knuth provides in that paper are still relevant in any modern language. By that measure, Dijkstra won.

    It's not surprising either, Dijkstra was always in utopia, talking about how things would be if he build the world himself (which doesn't mean he's wrong). Knuth has always been about how to deal with the current reality (including the state of programming languages), and not so much about changing that reality.
  • by geminidomino ( 614729 ) on Wednesday March 10, 2010 @05:12AM (#31424158) Journal

    What intro-level courses use C or C++?

    Florida State University -- COP3330, "Intro to Computer Programming". 100% C++

  • by Anonymous Coward on Wednesday March 10, 2010 @05:22AM (#31424210)
    Well it IS done with jump instructions, but as few as possible because the branch penalty is usually high (especially on an x86). If you don't use the goto statement then your program is more abstract, and structures like loops can be more easily optimised by the compiler to use as few branches as possible. Not to mention things architecture-specific like ARM's condition codes which can turn a loop with multiple if-else statements into a block of code with only one branch instruction.
  • by tepples ( 727027 ) <> on Wednesday March 10, 2010 @10:38AM (#31425892) Homepage Journal

    Sometimes I wished `break` could take argument of how many levels it should break out of

    It can in PHP []. Java [] and Perl [] have a different solution: label the start of a loop and then use that label as the argument of break. In C, it's just a matter of discipline to use goto only to replace a throw or labeled break.

The human mind ordinarily operates at only ten percent of its capacity -- the rest is overhead for the operating system.