Hi,
Kacper is right - it is in the standard.
But the standard merely says "Set the rest of event-message as appropriate".
The rest is rather APL2 specific. I could also argue that the current
value of the parameter
is more relevant to the exception than the original value. I have put
this into
README-4-compliance as mid-term issue because I believe the requirement
is really bad.
/// Jürgen
On 07/14/2014 05:19 PM, Blake McBride wrote:
Dear Juergen,
Every place that I use ⎕ES I am being forced to treat the arguments as
read-only. I also had to re-order code to account for optional
arguments. It makes for some ugly code. I hope when you add lazy
copying of arrays, the internal code to do this correctly won't be a
problem.
Showing it as a locked function, IMO, is very important. The point
being that you are telling the user, don't worry about what is inside,
it doesn't matter, you passed the wrong arguments. If it didn't work
this way, the user/programmer would think the function they called
(the callee) had the problem. It is telling them the problem is with
the caller and not the callee.
As commented by Kacper, it is in the spec - section 11.5.7.
Thanks.
Blake
On Mon, Jul 14, 2014 at 9:15 AM, Juergen Sauermann
<[email protected] <mailto:[email protected]>>
wrote:
Hi Blake,
I believe the ⎕ES related bugs reported recently should be fixed
in SVN 372.
This one is not, though. The reason is that fixing it would have
considerable performance
impacts (we would need a copy of every defined function argument
only for the rare case that ⎕ES
is called),
I also find it somewhat arbitrary to show a non-locked function as
locked in this very specific case.
Since ⎕ES is not ISO-standard anyhow, I take the freedom to trade
performance for APL2 compatibility.
/// Jürgen
On 07/12/2014 06:34 PM, Blake McBride wrote:
)CLEAR
CLEAR WS
∇test x
[1] x←'xx'
[2] ⎕ES 'SOME ERROR'
[3] ∇
test '55'
SOME ERROR
test 'xx'
^ ^
⎕ES is showing the modified and not the original argument passed
to the function. IBM APL 2 displays the original argument passed.
Thanks.
Blake