[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sc-devel] Function:next :asStream



When learning SC I'd thought that 'next' was mostly just intended to be a semantically suggestive synonym for 'value'. (Routine doc suggests this...) What is the distinction between the two? I can see cases like in Event, where you get a copy with next but not with value.

S.

On 18 Dec 2007, at 22:05, ronald kuivila wrote:

Hi guys,

One argument for the current policy is to claim that next and embedInStream should describe similar sequences. Function:embedInStream needs to return the function rather than its value. If not, patterns could not define sequences
 of functions.

Of course, embedInStream defines a one element sequence while next returns an infinite sequence, so 'next'
and 'embedInStream' are already different.

And Functions cannot embed other Streams (you need a Routine), so it is already a special case.

I find it tempting....

RJK



On Dec 18, 2007, at 11:45 AM, James Harkins wrote:

I think next should do the same thing as value against functions.

Among other benefits, you wouldn't need to write Pfunc() all the time.

Pbind(\freq, { ...})

That would make some things a whole lot easier for me.

hjh


On Dec 18, 2007 10:27 AM, Scott Wilson <i@xxxxxxxxxxxxxx> wrote:
Is there a reason why Function:next should not be a synonym for
'value'? (Something to do with the need for FuncStream?)

I've just come across the issue of when next and value are really
interchangeable in a chapter for the book.

Similarly, Function:asStream returns the function itself.

--
James Harkins /// dewdrop world
jamshark70@xxxxxxxxxxxxxxxxx
http://www.dewdrop-world.net

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman
_______________________________________________
Sc-devel mailing list
Sc-devel@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-devel


_______________________________________________
Sc-devel mailing list
Sc-devel@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-devel