guile-devel
[Top][All Lists]
Advanced

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

Re: Why not support (begin), (cond), (case-lambda), etc?


From: David Kastrup
Subject: Re: Why not support (begin), (cond), (case-lambda), etc?
Date: Fri, 06 Jan 2012 14:02:16 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Alex Shinn <address@hidden> writes:

> On Fri, Jan 6, 2012 at 9:50 PM, David Kastrup <address@hidden> wrote:
>> Alex Shinn <address@hidden> writes:
>>
>>> On Fri, Jan 6, 2012 at 9:26 PM, David Kastrup <address@hidden> wrote:
>>>> Alex Shinn <address@hidden> writes:
>>>>>
>>>>> This analogy is meaningless, but for the record
>>>>> you should be using fold or reduce here.
>>>>
>>>> I don't think it is the task of a language to enforce arbitrary
>>>> aesthetic criteria.  He "should be using"?
>>>
>>> This has nothing to do with style, but performance
>>> and scalability.  "apply" will blow up in most implementations
>>> depending on the length of the list.
>>
>> Do you think that we should remove the passage
>>
>>     `concatenate' is the same as `(apply append LIST-OF-LISTS)'.  It
>>     exists because some Scheme implementations have a limit on the
>>     number of arguments a function takes, which the `apply' might
>>     exceed.  In Guile there is no such limit.
>>
>> from the manual in order not to seduce people into using Guile?
>
> I think it should be removed because it's no longer true:
>
> scheme@(guile-user)> (apply + (iota 1000000))
> standard input:1:0: In procedure #<procedure 102329220 at standard
> input:2:0 ()>:
> standard input:1:0: Throw to key `vm-error' with args `(vm-run "VM:
> Stack overflow" ())'.

A "Stack overflow" does not look like a limit in the number of function
arguments but rather a general computation limit.

-- 
David Kastrup



reply via email to

[Prev in Thread] Current Thread [Next in Thread]