Share via


Dynamic Languages for Tots

Dynamic languages (see Wikipedia if you’ve been living under a rock for the past decade or so) such as Python offer some substantial advantages over static languages such as C. I’m not going to belabor the pros and cons – folks like Jon Udell have done that for me (smartly) and some others have done so less wisely.

I’m interested in a very specific scenario in which dynamic languages could help: novices.

OK, OK, I realize that dynamic languages aren’t going to satisfy the purists who want all CS students to learn about typing and there are those who’ve argued that dynamic languages are breeding grounds for bad coding practices.

I also realize that there are probably some folks out there thinking that Python isn’t exactly the first language you think of when you think of novices. But there are a whole lot of people – people who don’t consider themselves programmers – who’ve gotten very comfortable with a host of dynamic languages. Think PHP. Think Javascript. Think VBScript. Think Perl.

But for someone who’s not a CS-track programmer – who’s just interested in coding for fun – the ability to have a more interactive programming style. I don’t necessarily mean interactive programming in the dictionary definition sense. I’m talking about a kind of cause-and-effect programming where the actions you take in code have a very tight and immediate effect on the application.

So: good, evil, or do I just not get it?

Comments

  • Anonymous
    April 13, 2006
    The comment has been removed
  • Anonymous
    April 13, 2006
    The comment has been removed
  • Anonymous
    April 13, 2006
    The comment has been removed
  • Anonymous
    April 13, 2006
    The comment has been removed
  • Anonymous
    April 13, 2006
    I like Python. I'd consider teaching it to my kids, if they were interested.

    Other possibilities:

    StarLogo TNG (see http://www.byte.com/documents/s=9957/byt1141336941474/0306_mh.htm) and StarLogo

    Ruby (see http://www.byte.com/documents/byt1113843775910/) and the book "Learn to Program"

    The Kid's Programming Language (see http://www.byte.com/documents/s=9552/byt1128970353339/1010_heller.html)
  • Anonymous
    April 13, 2006
    The comment has been removed
  • Anonymous
    April 14, 2006
    I have mixed feelings about this.  I suppose from a learning perspective it is good to get someone into programming.  But I do think that they're a breading ground for bugs... specificaly since many of the errors that end up popping up are only found through testing code, whereas those same bugs would simply not compile in a static language.  

    And since we all know how hard it is to get seasoned programmers to thoroughly test code, imagine what its like to get a novice to do it, and do it well.

    Thats one of my gripes with .NET for instance.  Because practically everything is on the heap, it has increased Null Reference Exceptions greatly.
  • Anonymous
    April 14, 2006
    Yes, but in "cause-and-effect programming where the actions you take in code have a very tight and immediate effect on the application"
    I think you reveal a blind spot for an important point. With novices (as with dynamic languages), I don't think there's always a "the" application. And even if there is a primary application, I think one of the HUGE advantages of a REPL-style environment is that it's not just this incremental building of the primary application, but there's an ability to wander down significant tangents.

    For instance, I haven't internalized how Ruby constructs its arrays when "nil" values are involved and, sure enough, the other day I was facing that issue with a data structure. In the VS environment, I would have to either mess around within my big, complex-enough application, or start a "New project..." and experience this massive context switch. In a REPL environment, I can, instead, spend 5-10 minutes building arrays and arrays of arrays, etc., and then eventually cut-and-paste that code back into the guts of my main project.
  • Anonymous
    April 15, 2006
    A wonderful observation -- sometimes learning is about the process, not the end goal. Wandering through a programming environment, bumping into things that you weren't looking for necessarily (like I found Ruby's chomp) makes programming a kind of serendipitous experience.
  • Anonymous
    April 17, 2006
    The comment has been removed