programming, using op(), was ..RE: Bugfix for GosperSum? (was: cannot load Zeilberger)



On 1/6/07, Richard Fateman <fateman at cs.berkeley.edu> wrote:

> Also, be aware that op()  takes a fair amount of time and space,
> since it formats its argument.

If op is a bottleneck for many programs, we should work on
speeding up nformat then. Better than than to tell every user
to use a more obscure alternative.

> Else  case(inpart(expr,0),
>            ["+", yyy],
>            ["*", zzz],
>            [otherwise, ...])

I'm not opposed to having a case statement, but I don't like
constructs that don't distinguish the different parts.
I don't think a list of 2-element expressions has anything to
recommend it, except it would be easy to implement.

Better would be something more explicit like

  FOO (expr, case "+" : yyy, case "*" : zzz, otherwise : ...)

where FOO represents the name of this thing (I don't have
any suggestion for that). Other people doubtless have other
ideas about what make the keywords or how to arrange the
syntax. That's fine, I'm not heavily invested in the syntax
shown above.

best
Robert