3 ms·
I don't think a linked list in Java is a good example. I took two CS intro courses in a row last year; the first one used Scheme and the second one concentrated
by tikhonj 15y ago
I don't think a linked list in Java is a good example. I took two CS intro courses in a row last year; the first one used Scheme and the second one concentrated on data structures and used Java. There were some completely inexperienced people taking the two courses along with me.
As far as I could tell they had much more difficulty with linked lists and trees in Java, which made them needlessly complex, than they did in Scheme. And this is with people who had actually learned about both concepts first in Scheme, so they had more experience when they came to Java.
- wanorris 15y agoFair point. Perhaps I picked a bad example. At the same time, if you were writing a bunch of random awk-like one-offs as part of your normal lisp workflow, you wouldn't write 4 lines of code every time, right? You sit down and write some functions or macros that condensed it into something simple that allowed you to easily specify things like a split token, one or more filter-on fields and values (or better, a filter lambda), and one or more output fields, I bet. Because it's silly to write several lines for something you do a lot. And while you might call it process-file-and-return-matching-results or something, the interface to the result might not be so different from the line of awk in the original post.