Re: Pointers in Haskell??

2001-12-16 Thread Tom Pledger
Hamilton Richards writes: | In my previous example, | | > t = [0..] | > b = 3 : t | > c = 5 : t | | lists b and c share t, but in | | > x = 3 : [0..] | > y = 5 : [0..] | | lists x and y share nothing. Extensionally, they have the same | values as b and c, but each has its own

Re: Pointers in Haskell??

2001-12-10 Thread William Lee Irwin III
On Mon, Dec 10, 2001 at 12:58:33AM -0800, Simon Peyton-Jones wrote: > | > Simon Peyton-Jones. The implementation of functional > | > programming languages. Prentice-Hall, 1987 > | > | is this book could be made available online ? cos on amazon > | it seems out of print. > > I'm planning

RE: Pointers in Haskell??

2001-12-10 Thread Simon Peyton-Jones
| > Simon Peyton-Jones. The implementation of functional | > programming languages. Prentice-Hall, 1987 | | is this book could be made available online ? cos on amazon | it seems out of print. I'm planning to scan it in and make the copy available online. In the next month or two. Simo

SPJ (and others') book. Was: Pointers in Haskell??

2001-12-10 Thread Jerzy Karczmarczuk
Mark P Jones comments: ... > | > > Simon Peyton-Jones. The implementation of functional > | > > programming languages. Prentice-Hall, 1987 ... > | This book is already on-line at > | > | http://research.microsoft.com/Users/simonpj/Papers/student.ps.gz > That's a useful resource too, b

Re: Pointers in Haskell??

2001-12-07 Thread Jeff Dalton
> >> ... So the question of whether names are "*the* (only) way" to obtain > >> sharing isn't really a language question-- it's more of a > >> compiler question. > > > >Are they the only way that's guaranteed to result in sharing, or is > >even that not the case? > > Depends on what you mean by "

RE: Pointers in Haskell??

2001-12-07 Thread Mark P Jones
| > > Simon Peyton-Jones. The implementation of functional | > > programming languages. Prentice-Hall, 1987 | > | > is this book could be made available online ? cos on amazon it seems | > out of print. | | This book is already on-line at | | http://research.microsoft.com/Users/simonpj/P

Re: Pointers in Haskell??

2001-12-07 Thread Hamilton Richards
At 12:29 PM -0600 12/7/01, Jeff Dalton wrote: >In-Reply-To: Hamilton Richards's message of Fri, 7 Dec 2001 12:11:23 -0600 > > ... But suppose in Java I have > > Object x = new Whatever(); > >and that new object has some large substructures. I can get >one of those substructures to be shared, r

RE: Pointers in Haskell??

2001-12-07 Thread ADAMS,RICHARD (Non-HP-Roseville,ex1)
, December 07, 2001 7:30 AM To: [EMAIL PROTECTED] Subject: Pointers in Haskell?? I am totally new to Haskell, so maybe this is a stupid question. Various languages have pointers (or references), for good reason. Haskell can at least partly do without them (they are only existing internally somehow). My

Re: Pointers in Haskell??

2001-12-07 Thread Gregory Wright
This book is already on-line at http://research.microsoft.com/Users/simonpj/Papers/student.ps.gz (It was noted on the "Books and Tutorials" link from haskell.org, which is usually the best place to start looking for something Haskell.) Best Wishes, Greg On Fri, 2001-12-07 at 12:57, Yoann Pad

Re: Pointers in Haskell??

2001-12-07 Thread Jeff Dalton
In-Reply-To: Hamilton Richards's message of Fri, 7 Dec 2001 12:11:23 -0600 > In my previous example, > > > t = [0..] > > b = 3 : t > > c = 5 : t > > lists b and c share t, but in > > > x = 3 : [0..] > > y = 5 : [0..] > > lists x and y share nothing. Extensionally, they have the same valu

Re: Pointers in Haskell??

2001-12-07 Thread Hamilton Richards
In my previous example, > t = [0..] > b = 3 : t > c = 5 : t lists b and c share t, but in > x = 3 : [0..] > y = 5 : [0..] lists x and y share nothing. Extensionally, they have the same values as b and c, but each has its own copy of [0..]. Unless, that is, the compiler is clever enough

Re: Pointers in Haskell??

2001-12-07 Thread Jeff Dalton
> All Haskell compilers use pointers internally. The > idea is that because Haskell is referentially > transparent and side effect free, you can overwrite > a function application with its result. For example, > > let > x = [1..1000] > in > foo (A x) (B x) > > Will internally have "x" pointi

Re: Pointers in Haskell??

2001-12-07 Thread Yoann Padioleau
Jan Kort <[EMAIL PROTECTED]> writes: > > Simon Peyton-Jones. The implementation of functional > programming languages. Prentice-Hall, 1987 is this book could be made available online ? cos on amazon it seems out of print. > > Jan > > ___

Re: Pointers in Haskell??

2001-12-07 Thread Jan Kort
"Bryan Hayes (Hayes Technologies)" wrote: > > I am totally new to Haskell, so maybe this is a stupid question. > Various languages have pointers (or references), for good reason. > Haskell can at least partly do without them (they are only existing internally >somehow). > My question is: Does Ha

Re: Pointers in Haskell??

2001-12-07 Thread Jeff Dalton
The answers are making this question seem trickier than I'd thought it was, because so far they (both) make it sound like structure-sharing is tied very closely to names / variables. For instance: > In Haskell, you can arrange for a large data structure to be shared by > giving it a name, and th

Re: Pointers in Haskell??

2001-12-07 Thread Hamilton Richards
At 9:30 AM -0600 12/7/01, Bryan Hayes (Hayes Technologies) wrote: > I am totally new to Haskell, so maybe this is a stupid question. > Various languages have pointers (or references), for good reason. > Haskell can at least partly do without them (they are only existing > internally somehow). > My

Re: Pointers in Haskell??

2001-12-07 Thread Ch. A. Herrmann
Hello, > "Bryan" == Bryan Hayes <(Hayes Technologies)" ><[EMAIL PROTECTED]>> writes: Bryan> My question is: Bryan> Does Haskell principally not need pointers (i.e. in case of 2 Bryan> data structures needing to reference an other very large data Bryan> structure) or is this

Pointers in Haskell??

2001-12-07 Thread Bryan Hayes (Hayes Technologies)
I am totally new to Haskell, so maybe this is a stupid question. Various languages have pointers (or references), for good reason. Haskell can at least partly do without them (they are only existing internally somehow). My question is: Does Haskell principally not need pointers (i.e. in case of 2