[Scilab-Dev] vector^scalar allowed again in Scilab 6?
Samuel Gougeon
sgougeon at free.fr
Wed Aug 10 20:02:15 CEST 2016
Hello Pierre-Aimé,
Le 10/08/2016 17:56, Pierre-Aimé Agnel a écrit :
>
> Hello,
>
> It was changed at resolution of
> http://bugzilla.scilab.org/show_bug.cgi?id=14316
>
> I am not sure though whether enforcing the 'vector ^ scalar' error
> should be reintroduced. My 2-cents: there are many operations that
> have the same behaviour that their dot-operation counterpart when used
> with a scalar.
>
> I think the operation should remain available, but I can also enforce
> the obsolescence in the release for 6.0.0.
>
Thanks for your answer.
I understand that the reversion of the vector^scalar change was done
when fixing #14316,
but as far as i understand, things are not connected. This reversion was
not mandatory to fix #14346.
IMO, what was planed for Scilab 6 was great.
I know that this syntax vector^scalar instead of vector.^scalar was very
widespread. But instead of parsing vector^scalar as vector.^scalar as in
Scilab <6 or always yielding an error, why not making Scilab 6 testing
whether the overload %s_p_s() (or other%@_p_@() overload according to
operands types) exists. Then, users wanting to work with the old
equivocal behavior could define deff("r=%s_p_s(a,b)","r=a.^b") in their
library (or startup file) instead of changing all their code. Or/and
include their own warning in their overload whether they wish to
actually upgrade their code. And that's it.
Best regards
Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/dev/attachments/20160810/520a375c/attachment.htm>
More information about the dev
mailing list