Re: [racket] Multiple return values

2011-12-16 Thread Markku Rontu
On Fri, Dec 16, 2011 at 3:15 PM, Matthias Felleisen wrote: > > Does Racket blindly inherit from Scheme because of history? > > No, Racketeers choose what to take over and what to leave behind. > Great, I'm waiting for the fruits of the labour with great anticipation and gratitude ;) > > Why are

Re: [racket] Multiple return values

2011-12-16 Thread Jay McCarthy
On Thu, Dec 15, 2011 at 3:32 PM, Neil Toronto wrote: > On 12/15/2011 05:03 AM, Markku Rontu wrote: > >> Named return values, ah the dream of symmetry. >> > > I think my mad-scientist advisor did something like this once. I think it > would be awesome to have this, and of course keyword arguments,

Re: [racket] Multiple return values

2011-12-16 Thread Matthew Flatt
At Fri, 16 Dec 2011 14:45:51 +0200, Markku Rontu wrote: > Hmm, I don't get the logic. Ignored single return value is not a bug and is > ok (because that's how things happened to be in that case in the first > place) but ignored multiple-value is a bug (because that's how things > happened to be in

Re: [racket] Multiple return values

2011-12-16 Thread Matthias Felleisen
Does Racket blindly inherit from Scheme because of history? No, Racketeers choose what to take over and what to leave behind. Why are multiple values useful? Multiple values enable a smooth functional style where pedestrian programmers may have to use clumsy package-unpackage or, worse, im

Re: [racket] Multiple return values

2011-12-16 Thread Markku Rontu
On Fri, Dec 16, 2011 at 2:22 PM, Neil Van Dyke wrote: > Zayr Okale wrote at 12/16/2011 06:52 AM: > > In the simplest cases in CL I can ignore extra values for free (without >> extra wrappers or any other code clutter). In Racket I cannot, and this is >> what prompted my question: why not do it t

Re: [racket] Multiple return values

2011-12-16 Thread Neil Van Dyke
Zayr Okale wrote at 12/16/2011 06:52 AM: In the simplest cases in CL I can ignore extra values for free (without extra wrappers or any other code clutter). In Racket I cannot, and this is what prompted my question: why not do it the CL way? An ignored value of a multiple-value return could be

Re: [racket] Multiple return values

2011-12-16 Thread Zayr Okale
On 15/12/2011 21:17, Tomasz Rola wrote: On Thu, 15 Dec 2011, Zayr Okale wrote: I even do understand what multiple return values are useful for in CL: "okay, the function calculates other potentially useful values anyway, so no reason not to make them available". Unfortunately, this scenario do

Re: [racket] Multiple return values

2011-12-15 Thread Sam Tobin-Hochstadt
On Thu, Dec 15, 2011 at 5:32 PM, Neil Toronto wrote: > On 12/15/2011 05:03 AM, Markku Rontu wrote: >> >> Named return values, ah the dream of symmetry. > > I think my mad-scientist advisor did something like this once. I think it > would be awesome to have this, and of course keyword arguments, as

Re: [racket] Multiple return values

2011-12-15 Thread Neil Toronto
On 12/15/2011 05:03 AM, Markku Rontu wrote: Named return values, ah the dream of symmetry. I think my mad-scientist advisor did something like this once. I think it would be awesome to have this, and of course keyword arguments, as first-class constructs in Racket. (As far as I understand,

Re: [racket] Multiple return values

2011-12-15 Thread Tomasz Rola
On Wed, 14 Dec 2011, Zayr Okale wrote: > Hello, everyone. > > Can someone please explain to me multiple return values? Not what it does, > I understand that much, but what is this feature for? In what situations is > it useful? I am not sure how much usable values/call-with-values are in Scheme.

Re: [racket] Multiple return values

2011-12-15 Thread Tomasz Rola
On Thu, 15 Dec 2011, Zayr Okale wrote: > I even do understand what multiple return values are useful for in CL: "okay, > the function calculates other potentially useful values anyway, so no reason > not to make them available". > > Unfortunately, this scenario doesn't apply to Racket. And this i

Re: [racket] Multiple return values

2011-12-15 Thread Stephan Houben
On 12/15/2011 12:39 PM, Zayr Okale wrote: Unfortunately, this scenario doesn't apply to Racket. And this is exactly what prompted my question. Since one of the reasons behind multiple return values is, as David Van Horn pointed out, symmetry with multiple input values (function arguments), th

Re: [racket] Multiple return values

2011-12-15 Thread Markku Rontu
Named return values, ah the dream of symmetry. -Markku - Reply message - From: "Zayr Okale" To: "Tomasz Rola" Cc: Subject: [racket] Multiple return values Date: Thu, Dec 15, 2011 13:39 On 14/12/2011 21:20, Tomasz Rola wrote: > On Wed, 14 Dec 2011, Zayr

Re: [racket] Multiple return values

2011-12-15 Thread Zayr Okale
On 14/12/2011 21:20, Tomasz Rola wrote: On Wed, 14 Dec 2011, Zayr Okale wrote: Hello, everyone. Can someone please explain to me multiple return values? Not what it does, I understand that much, but what is this feature for? In what situations is it useful? I am not sure how much usable value

Re: [racket] Multiple return values

2011-12-14 Thread John Clements
On Dec 14, 2011, at 6:15 AM, Matthias Felleisen wrote: > > CPS is for old people. Be careful. > > See Dybvig's paper on measurable benefits (or lack thereof) for values and > friends. You're referring to 1994, "An efficient implementation of multiple return values in Scheme" ? John smi

Re: [racket] Multiple return values

2011-12-14 Thread Grant Rettke
http://www.wisdomandwonder.com/link/1794/returning-multiple-values-in-scheme Racket has more forms right? On Wed, Dec 14, 2011 at 4:54 AM, Zayr Okale wrote: > Hello, everyone. > > Can someone please explain to me multiple return values? Not what it does, I > understand that much, but what is thi

Re: [racket] Multiple return values

2011-12-14 Thread Matthias Felleisen
r 14, 2011 7:56:15 AM GMT -05:00 US/Canada Eastern > Subject: Re: [racket] Multiple return values > > On 12/14/11 5:54 AM, Zayr Okale wrote: >> Hello, everyone. >> >> Can someone please explain to me multiple return values? Not what it >> does, I understand that much,

Re: [racket] Multiple return values

2011-12-14 Thread J. Ian Johnson
id Van Horn" To: users@racket-lang.org Sent: Wednesday, December 14, 2011 7:56:15 AM GMT -05:00 US/Canada Eastern Subject: Re: [racket] Multiple return values On 12/14/11 5:54 AM, Zayr Okale wrote: > Hello, everyone. > > Can someone please explain to me multiple return values? Not

Re: [racket] Multiple return values

2011-12-14 Thread David Van Horn
On 12/14/11 5:54 AM, Zayr Okale wrote: Hello, everyone. Can someone please explain to me multiple return values? Not what it does, I understand that much, but what is this feature for? In what situations is it useful? It's useful in situations where several values are the result of a single c

[racket] Multiple return values

2011-12-14 Thread Zayr Okale
Hello, everyone. Can someone please explain to me multiple return values? Not what it does, I understand that much, but what is this feature for? In what situations is it useful? _ For list-related administrative tasks: http://lists.racket-lang.o