Re: GCL limitation (was Maxima 5.9.0.9rc1 available)
Subject: Re: GCL limitation (was Maxima 5.9.0.9rc1 available)
From: Richard Fateman
Date: Wed, 22 Sep 2004 08:04:07 -0700
Andrej Vodopivec wrote:
> Na 1095860361, 2004-09-22 ob 15:39, je Barton Willis napisal(a):
>
>>(1) See
>>http://www.franz.com/support/documentation/6.2/ansicl/dictentr/call-arg.htm
>>
>
>
> Can this limit be changed or is it hardcoded in gcl? My real problem is
> that I can only load matrices with less than 65 rows using numericalio.
>
There are two issues here.
1. Should Maxima allow functions of arbitrary numbers of arguments?
2. Should you, as a programmer, write programs that require huge
numbers of arguments?
My answers: 1. Yes.
If maxima is supposed to "imitate math" but constructively, there
is no such limit on functions in math. Maxima should also have infinite
amounts of memory, because math is not limited to 4 gigabytes.
{apparently you can have function forms with more than 64 elements, otherwise
you could not have mlist(a1, a2, ...) or [a1, a2, ....] )
2. No.
If you want to pass a large collection of objects a1, a2, ..., an to a function f,
then hand that function a single list of the objects [a1, a2, ... , an].
Then f has only 1 argument. From a pragmatic point of view, it
is unlikely that you have a need to identify each argument by a
different name. You are probably indexing it, or mapping over the arguments.
...what is this different name?? consider a program manipulating personnel
records. You might, but probably would not, write a function
process_record(first_name,last_name,id_number,salary, date_hired, birthday, ....
.... on and on and on for more than 64 entries) := ....
Basically compiler writers or language implementors think this is so
unwieldy that they are entitled to set a limit on arguments.