another rivertrail question

Norm Rubin nrubin at nvidia.com
Fri Apr 5 05:54:26 PDT 2013


In an elemental function  does throwing an error, count as a side effect?

For instance

V2 = new Array(10, function(){return 23} ,14)

V1 = ParallelArray(14,12,10)

   V1.map( function(e,i)  { var temp = array[e-12] = v2[i].toFixed() ; ...  })

Since the toFixed will  throw a type error when i =1, and a range error when e = 10

If this is a side effect, then it is not an elemental function and should throw Error, not typeError or rangeError









-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130405/82de39c8/attachment.html>


More information about the es-discuss mailing list