Tracy R Reed wrote:
Darren New wrote:
Errr, no. Python, Java, Javascript and Ruby all have pointers. Probably erlang as well, but I don't know that one yet, and possibly Perl for some meaning of the word "pointer". Not Haskell or Tcl, because they're both value-only languages, in essence.
They have references. Which are similar to pointers but you can't do pointer math on them. That makes all the difference it seems.
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 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.
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.

--Chris

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to