Re: EE Student, Edit, Proposal Masters, Help (concepts of functional programming, symbolic programming and MATLAB)

From: Richard Fateman (fateman_at_cs.berkeley.edu)
Date: 03/09/05


Date: Wed, 09 Mar 2005 01:20:51 GMT

Robert Israel wrote:
...
>
>>Do you have a reference for this? I wonder if the definition of a list
>>is agreed upon in the context of computer science.
>
>
> I think we have a terminology problem here. Maple has a specific data
> type called a list, which is not the same as what computer science calls
> a list. In Maple, a list (at the user level) is an ordered sequence of
> expressions enclosed in square brackets.
>

Lisp presumably has precedence in computer science, in using the
word "list". In that context John Creighton is right.

In lisp there are atoms and lists. (I am somewhat simplifying this...)
A symbolic expression or s-exp is either nil, an atom, or
  a pair (a CONS cell), e.g. (a . b)
The two components, here a, and b, can be any s-exp.

Lists are composed of cons cells. (a . nil) is also written (a)
(a . (b . (c . nil))) is written (a b c).

(a . ((r . nil) . (c . nil))) is written (a (r) c).

etc.

Maple's notion of list would be encoded in lisp something like this:

(<maple-special-number-for-list-thing> a b c d e )

Lisp's notion of list allows anything to be that first element.

There's lots of info on-line about lisp. There is relatively
little about Maple's debt to lisp, at least that I'm aware of.



Relevant Pages

  • Re: Cons cell archaic!?
    ... How would the implementation of a Lisp without a using cons look like? ... the irregularity in its often cited regular syntax. ... Lisp at core is based on functional programing on lists. ...
    (comp.lang.lisp)
  • Re: How powerful macros are?
    ... >> for software engineers to use arrays for everything, ... Did I miss something or is #an impossibly unbearable syntax in Lisp? ... and arrays are often slower for very short lists. ... I've also extended the language so that I have re-readable hash tables ...
    (comp.lang.lisp)
  • Re: Cons cell archaic!?
    ... why lisp has the cons problem and was never ... langs that deal with lists, vast majority of list usage is just simple ... and if it's not done in those other languages it must be ... Java and Lisp as languages worth consiering, ...
    (comp.lang.lisp)
  • Re: Lisp collections
    ... If a programming language specification talks about a data type, ... For example, The Common Lisp Hyperspec talks about lists, ... misapprehension that Lisp programmers generally just used lists to store ...
    (comp.lang.lisp)
  • Static or runtime type-checking (was: Program compression)
    ... I know that everything and the kitchen sink has been added to LISP. ... Seed7 seems to be rather limited in what it can easily support. ... list-processing primitives as applied to linked lists (push new ... Only internal types can be checked at compile time. ...
    (comp.programming)