Re: A petition to J3 apropos FORTRAN's future

From: James Giles (jamesgiles_at_worldnet.att.net)
Date: 03/17/04


Date: Wed, 17 Mar 2004 21:35:19 GMT

Dr Chaos wrote:
...
> C had structures. You could make linked lists which looked
> like they were from the the textbooks. You could make trees.

This particular argument always bothers me. The textbook
writers were in need of some simple examples to demonstrate
the basic properties of pointers. They chose lists and trees
as simple things that students could understand so that they
could concentrate on the purpose of the lesson: teaching
the properties of pointers.

However, it is *not* a good idea to implement lists or trees
with the naive textbook style! In fact, that's almost always one
of the worst approaches you can take. The textbook had a
specific purpose: teaching pointers. The programmer has
a different purpose: using lists or trees. The textbooks
didn't teach that second purpose.

-- 
J. Giles


Relevant Pages

  • Re: A petition to J3 apropos FORTRANs future
    ... You could make linked lists which looked ... > the basic properties of pointers. ... > with the naive textbook style! ... > specific purpose: teaching pointers. ...
    (comp.lang.fortran)
  • Re: [RFC] Lock free fd lookup
    ... >needing updates, like radix trees, B+ trees, arrays of pointers, and ... concurrent update of lists and structures that contain embedded ... everything running a lockfree list will make progress. ... The downside is that the algorithms rely on an extra sequence field per ...
    (Linux-Kernel)
  • Re: comments on my design of a new language?
    ... Trees, Lists, Regular ... expressions back to library status to keep things as clean as possible. ... arrays, and functions. ...
    (comp.lang.misc)
  • Re: comments on my design of a new language?
    ... Trees are essentially nested dictionaries, and this is the only place where unordered uniqueness occurs. ... Lists are ordered? ... Though it is not something most people would have use for, I have always wanted a mechanism for generating a random string that obeys a regular expression rule. ...
    (comp.lang.misc)
  • Re: Do people dislike parentheses or the conceptual mismatch with trees?
    ... the s-expression simply models real life in this aspect; ... lists, but not necessarily treating the elements as equal siblings ... an argument in designing general solutions. ... it's not needed in syntaxes that have been designed for trees. ...
    (comp.lang.lisp)