begin quoting Christopher Smith as of Tue, Jan 15, 2008 at 11:54:16AM -0800: > Tracy R Reed wrote: [snip] > >They have references. Which are similar to pointers but you can't do > >pointer math on them. That makes all the difference it seems. > (Why the aversion to blank lines between paragraphs?) > > I think a lot of times the benefits of pointer arithmetic are highly > overstated. There was a time where it was handy because compilers > weren't smart enough to optimize code correctly, but in this day and > age, there are few things that one can accomplish with pointer > arithmetic that can't be accomplished with iteration and/or array > offsets. Given all the problems that pointer arithmetic can cause, I > think it's a *good thing* of comparatively few programmers are terribly > proficient with it.
I agree. I think they should have, at some point in time, used it -- so that when it gets shown to them ten years into their career, they don't respond with: "Oh, cool, that's nifty and new! Where can I use this?" > >I don't understand the confusion over pointers. I took the data > >structures class, made linked lists. doubly linked lists, queues, > >stacks, hash tables, etc. etc. It wasn't really a big deal. What was your background going in to the data structures class? Two years of Pascal, perhaps? Maybe a little C and shell-scripting? Possibly some BASIC with the magic incantations PEEK and POKE? > Yeah, and you can learn how to make all of those things in LISP & Scheme > from cons cells, or in Smalltalk & Java from arrays and objects. Really, > aside from some funky hacks like using xor to make compact doubly linked > lists (and even then), it's hard to imagine a self-respecting language > that you can't teach data structures and algorithms with, regardless of > whether they have pointer arithmetic. What's possible isn't always what's practical isn't always what's acceptable. When you teach a brilliant and motivated student, the choice of language is probably entirely irrelevent. It's when you teach the average student who's been told that they're stupid or dumb or not clever enough to program a computer that the language chosen becomes significant. IMNSHO, of course. -- It will depend on the student, it will depend on the teacher, If it happens to fit the marketplace, that's just a feature. Stewart Stremler -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg
