-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Oct 19, 2005, at 3:07 PM, Mark Engelberg wrote: > On 10/19/05, Kirby Urner <[EMAIL PROTECTED]> wrote: > >> Technically speaking, there's no mistake here. The coder created >> a local >> variable that went out of scope. He could always say "I meant to >> do that." >> > > Well, that's the point. Python doesn't recognize it as a mistake. > Clearly, in my example, the programmer intended to assign a new value > to an existing variable, rather than create a new variable. Some > languages make a distinction between these two concepts, so the > language can flag this as an error. Python doesn't make a > distinction, and therefore, a beginner programmer (and sometimes even > an advanced programmer) can create a semantic bug through a syntactic > mistake, and have an extraordinarily difficult time tracking down the > error. > > This is not a desirable trait in a "first programming language" for > teaching computer science. > Mark, I understand that you see this as a risk, and as a downside to using Python. However, I rarely see these kinds of errors in the programs that my students are writing in CS1 and CS2. As you point out below, Python is a good tool for writing short programs that are focused on problem solving. Well, those are the kinds of programs that students write in CS1. Learning to program Large scale bug free systems is an important part of the curriculum, but I would argue that students need to walk before they can run in this regard. I'm curious to hear from others that use Python for introductory computer science. How often do these 'semantic bugs' crop up for your students? Brad > --Mark > > P.S. For what it's worth, Python is the language I choose to use on a > daily basis, because I mainly write short programs to analyze various > puzzles I'm working on. It's a great tool for fast and practical > programming. But I think it would be very hard to write a bug-free > large-scale project in Python. (Granted, it's hard to write a > bug-free large-scale project in any language, but Python lacks the > facilities for verifying even the rudiments of correctness without > extensive run-time testing). I'm undecided about how useful Python > would be as an educational tool. Seems like it has some pros and > cons. Since the pros have already been talked about, I thought it was > worth bringing up one of the major cons that I perceive. > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > http://mail.python.org/mailman/listinfo/edu-sig > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Darwin) iD8DBQFDVrUYt6pClM1VKiYRAld3AJ97HNc8wcFsI7sEMJDmS0HDkNbPLwCggWEY SZt3LuW5gBSnjawPTy/nowY= =uZLU -----END PGP SIGNATURE----- _______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig