[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: functional programming is great, but why lists?



   please write some decent-sized program (say 10,000 lines of Scheme
   code) and then report back whether lists are useful or not. 
   
Thanks, Matthias.  Sorry, maybe I wasn't clear.  I'm certainly in no
position to judge whether lists are useful or not. 

But I have a few nephews & nieces of approx high school age, and I'm
always tempted to try to pull them into PLT Scheme.  But I wonder how
I'd answer that question, 

"Why are we using such a strange data structure?  It takes a lotta
 cleverness to get at the innards of a list (a (b (c (d)))), it'd be
 easier with vectors (a, b, c, d).  Just reversing a list to get (d (c
 (b (a)))) is itself a recursive gem."

I'd consider this an acceptable answer:

"Scheme is a great language, it's a lot better than C++ or Java for
 kids to learn, but you gotta get good at lists to hack Scheme, so
 that's about the 1st thing that kids need to learn."

But I'm hoping for an even better answer.

   P.S. TSS is a book of poetry on programming. Not more, not less.

I appreciated the poetry, I really liked your scramble, and that's in
the 1st chapter!  Just not clear how to sell such poetry to the young.