Re: Tcl as the choice for programming 101



Neil Madden wrote:

Les Cargill wrote:
...

The student's experience is to:
1) Type in the above text
2) See that it does indeed sort.


More importantly, they should understand how it works. The divide-and-conquer nature of the algorithm is much more obvious in the Haskell version than in pretty much any other language. I'd be hard pressed to come up with a description of quicksort in *any* language (computer or natural) that is better.

That is, more or less, what I'd meant by "is tautological". It read
almost like the excerpt from Hoare.

There are particular features of the language that make the code easy to read and suitable for teaching: algebraic pattern matching, list comprehensions (or higher-order functions), defining functions by cases, and good support for recursion -- which makes clear the how the algorithm relates to the structure of the data it works on (structural induction).

Let's turn this conversation around. What is it about Haskell that you think makes it inappropriate for an introductory course in programming?

Nothing! I don't know anything about it, and I apologize if
it came off that way. FWIW, that *is* an impressive
snippet of code.

Frankly, I didn't see any "knuckle busting" in the included
snippet, and therefore assumed it's a less-than wonderful
teaching tool. Probably my bad :) But maybe there's an "aha!" there,
and I missed it.

It gets a bit more complicated for demonstrating I/O and so on, having to introduce monads. But that can mostly be glossed over in an intro course, and isn't *that* hard to understand. What language would you use instead and why?


I think of two things as defining the laboratory experience.

I think of the inclined plane estimation of g (as per
Galileo ) , and I think of any ( ultimately ) stoichemical
experiment, where we'd "find" a "hidden" thing ( usually molecular weight ) by inference of observed phenomenon.

I was concerned that students would be able to duplicate the text you showed, see that it sorts, then yawn, and move on. That's not,
categorically, a bad thing.

But until you put me on the spot, I probably
hadn't considered the question correctly - what
is a good lab made of? It depends, doesn't it?

Given that, I would choose the language that was most likely
to make good labs possible. Which sounds suspiciously like
the very design concept for Tcl.

This may sound bizarre, but 6502 assembly, BASIC, and a C64
were significant for me personally - we reproduced the junior
physics lab experiments in a phsyics-department instrumentation
class - and that, in context, was a huge thing for me. I'd
forgotten BASIC at that point, but, again, *in context*,
being able to do that stuff in real time with mechanical
assistance seemed a big thing.

-- Neil

--
Les Cargill
.



Relevant Pages

  • Re: Help with an occupation
    ... Please provide a context, such as time and place, what sort of document you ... and what language it might be - words don't exist in a ... would like the convenience of receiving all soc.genealogy.jewish posts in ...
    (soc.genealogy.jewish)
  • Re: Help needed with expletives
    ... Ask someone who calls something "gay", what he would use for stronger ... language. ... the sort of context I hear it. ...
    (rec.arts.sf.composition)
  • Re: Female Intuition and Female Choice
    ... The statement on sharper sense is for instance, ... when the paragraph is read in context. ... but then I'm a man with meager language skills. ... learned skill, which women's gender role pushes them ...
    (talk.origins)
  • Re: Goedel - interesting problem?
    ... >statement of Godel's theorem as you'll get in nontechnical language. ... Probability is integral to inferencing in context, ... Explain the effect of Goedel's theorem to a music major, etc., who has ... If Torkel, read my reply to him just preceding ...
    (sci.logic)