On Jun 9, 2022, at 6:44 AM, Mark Waddingham via use-livecode 
<use-livecode@lists.runrev.com<mailto:use-livecode@lists.runrev.com>> wrote:

So I'm currently sitting here about to embark on fixing 
<https://quality.livecode.com/show_bug.cgi?id=23653> (which is the final thing 
to sort out before being able to merge my constant expression patch) and I was 
reminded of 'convertOctals'.

Now, generally, I am somewhat averse to actually removing any language feature 
(even those we have deprecated, unless we absolutely have to!) - however, I 
would really like to make convertOctals have no effect at all in 10.0+ as it 
adds a disproportionate amount of complexity compared to (what I think, at 
least) its utility is (particularly in the context of things 'coming next' like 
the script compiler).

So three questions:

 1) Do you know what convertOctals is, and what it does?

Nope

 2) If you do, have you ever actually used it in any scripts which are actually 
still in use?

Nyet

 3) If you do use it in any scripts which are still in use, would you be 
willing to change them to not use it?

N/A

 4) If you do use/have used it, had you ever noticed that it has been slightly 
broken for years?

Wait, you said three questions. But no.

Now, its always better to offer a carrot when there is a stick (or in this 
case, an axe) being wielded and the carrot in this case would be to expand the 
numeric literal syntax to add both explicit octal and binary number literals 
alongside hexadecimal:

   0xabcdef - hex literal
   0o777 - octal literal
   0b101110101

The key difference between 0o777 and using 0777 (with convertOctals true) is 
that the former is not ambiguous at parse time, it doesn't require a runtime 
property set to true in order for the engine to convert the string to a number 
correctly.

Please let me know your thoughts :)

Warmest Regards,

Mark.

P.S. In the scheme of 'breaking changes' - we've already made a number of them 
for 10 already, and my gut tells me removing convertOctals is likely to cause 
less consternation than those we already have - but I could be wrong!

--
Mark Waddingham ~ m...@livecode.com<mailto:m...@livecode.com> ~ 
http://www.livecode.com/
LiveCode: Everyone can create apps

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com<mailto:use-livecode@lists.runrev.com>
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Devin Asay
Office of Digital Humanities
Brigham Young University

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to