-
Notifications
You must be signed in to change notification settings - Fork 55
"arraySubtract" function behaviour correct after flipping params #576
Comments
OK thanks for looking, will go back and re-check my code. |
I was able to reproduce the issue with the JavaScript backend, which returns |
Oh OK. So does ERGOTOP use a different engine, or is it the JS that is generated is being transformed incorrectly? |
ERGOTOP uses an interpreter (which is meant to be used as a reference semantics). Cicero uses the compiler to JavaScript. So yes, this is a bug in the JavaScript target of the Ergo compiler. There is no transformation once the JavaScript code has been produced (unless you consider the NodeJS compiler as one such transformation but it's unlikely to be a bug there). |
OK thanks for the explanation, good to know how these things work. When do you expect to get a fix done? I ask because I am due to hand over the code to the client at the end of next week, and I will need to synchronise a new release of Cicero with a change to the code. |
There is an upcoming major release which I thought this would go into. I could do a minor release just for this, but I'd rather not add that to my plate right now. |
OK thats fine, do you have an ETA for the major release? If that is after we hand over the code then I will need to document this and tell the client they will have to make a code change. |
As discussed, we will stay on Cicero 0.6.3 for the client to maintain stability and document why the params are flipped. |
PR here: #580 |
Done in 0.7.0 |
I have seen some odd behaviour twice now in my code and I think I have found a problem but would need someone to check the implementation of the function to be sure.
The
arraySubtract
function has the following documented signature:But, it is behaving as if X and Y are flipped, e.g. "Removes elements of x in y".
The text was updated successfully, but these errors were encountered: