On 2017-08-09 18:50, Richard Gaskin via use-livecode wrote:
Imagine the frustration of passing an invalid object reference to
something like the delete command, and rather than reporting that it
couldn't do what it asked you it just arbitrarily deleted some other
object instead without notification. ;)
Indeed - that would be frustrating...
However, everyone writes code which relies on 'undefined behavior'
(which not throwing errors generally results in) at some point - so
there is a real issue with adding errors for things after the fact...
Particularly as this has been unchecked for the entire history of the
engine so a purely stick approach generally just causes user frustration
(and the occasional rant) [ this is not to say that bounds-checking in
this case would not be better in all ways one could potential imagine ].
Fortunately, there is a potential carrot to go with the stick - we can
expand the range of the bit operations (and baseConvert) to 52-bits
without too much difficulty I think; and add error checking at the same
time. Which would potentially make code which is currently broken 'at
the edges' (i.e. rarely touched) not ever encounter an error.
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps
use-livecode mailing list
Please visit this url to subscribe, unsubscribe and manage your subscription