[plt-scheme] self-referential data structures

From: Marco Morazan (morazanm at gmail.com)
Date: Thu Mar 5 18:54:07 EST 2009

On Thu, Mar 5, 2009 at 5:10 PM, aditya shukla
<adityashukla1983 at gmail.com> wrote:
> Here in chapter 9 the problem of adding all numbers of a list of numbers is
> explained.The method explained to tackle the problem is based on the data
> definition of list of numbers .And this has been the approach of the book
> that is a problem is solved according to the data definition of a data
> structure.Suppose I switch from scheme to any other programming language say
> c++ ,so should the same approach should be followed ?
>

Is the definition for a list of numbers in C++ any different from the
one in HtDP?

The DR is not language specific. What differs from language to
language and from programmer to programmer is how a data definition is
implemented. Read carefully what Matthias wrote. Even in Scheme we can
implement a data definition is several different ways: we can use
structures, functions, lists, etc.

-- 

Cheers,

Marco


Posted on the users mailing list.