oldk1331 wrote::
>
> I don't like the grammar that uses
>
> "func"/list1
>
> to do
>
> reduce(func, list1)
>
>
> First, this is a strange grammar.
>
> Also I don't like to have special grammar to do things can
> be done by normal grammar.
I am affraid the classic answer is appropriate here
"it is a feature, not a bug".
Expanding on it a bit: it is usual that syntactic choices
cause some disagreement. From my point of view this is
useful shortcut for frequently occuring operation.
It does not significantly increase complexity of the
parser and beside parser we need smal amount of extra
code. So from implementation point of view it is
cheap feature. I so no reason to remove it.
@Ralf: this construct kowns about identity for several
popular operations, so in such case works also for empty
lists. Of course, it would be nicer to do this in more
systematic way.
>
> This patch replaces '"append"/' with normal function call
> 'concat : List % -> %', it's simpler and faster.
>
Well, simpler is debatable. Faster is useful if speed
matters.
>
> If you agree, I plan to replace other usage of '"func"/' by
> normal function calls.
>
> grep '"[a-zA-Z]*" */' *spad shows 135 usage of such grammar,
> only uses function max/min/setUnion/and/or/gcd/lcm.
Well, as I wrote I think that "op"/... is a useful feature.
And it is useful to have some test cases for features.
So I would like to keep some (preferaby most) of uses of
this construct.
--
Waldek Hebisch
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/E1hw9SR-0002xI-MD%40hera.math.uni.wroc.pl.