Don't amputate numberFormat (was: affecting array keys???)

Mike Kerner MikeKerner at roadrunner.com
Mon Apr 24 10:10:07 EDT 2017


That's too bad.  I was hoping that I could trade deprecating
numberFormat for giving equal rights to the last item in a list.

Say it with me now:  EQUAL RIGHTS FOR ALL ITEMS!  EVEN THE LAST ONES!

On Mon, Apr 24, 2017 at 10:06 AM, Mark Waddingham via use-livecode <
use-livecode at lists.runrev.com> wrote:

> On 2017-04-22 02:51, Curry Kenworthy via use-livecode wrote:
>
>> Mark Waddingham:
>>
>>> I think this is perhaps more evidence that 'numberFormat'
>>> should probably be deprecated - or at least marked as
>>> 'present for HyperCard compatibility only and shouldn't
>>> be used in new code'.
>>>
>>
>> I emphatically disagree.
>>
>
> Don't worry - I don't entirely agree with my suggestion either :)
>
> I must confess I was being overly pejorative in order to provoke a
> conversation - something I have a tendency to do from time to time in
> order to help get a greater understanding of things.
>
> There's nothing wrong with numberFormat as a binary to text option. On
>> the contrary, it's a splendid way to present the formatting to users.
>> The array key example is an outlier case to watch out for, but it's
>> also easy to use an alternate formatting option or careful coding for
>> those rare cases.
>>
>
> I'd disagree that anything involving the use of arrays could be considered
> a 'rare case' or an 'outlier case'; so it is irksome that a feature
> (numberFormat) which is meant to make working with the display of numbers
> 'easier' is somewhat incompatible with it.
>
> I'd mind less if numberFormat was actually had wide utility - but, in
> reality,
> for all but the simplest of cases (wanting US/UK style numbers, with
> preceding or following '0's) it isn't very useful.
>
> To be fair, that is fine - the problems which keep recurring could
> probably be mostly dealt with by much better documentation of numberFormat.
> i.e. Clear explanation about how it affects computations, and when to use
> it
> and when not to
>
> That, however, does still leave me 'wanting' though. As you point out the
> *idea* is so ergonomic that it *seems* like it should be much more
> powerful,
> but it is not, and if you want to use it easily with other parts of the
> language, you are probably best not to use it at all.
>
> I can guarantee that nothing is going to happen to numberFormat (beyond
> perhaps improving its documentation) any time soon - if ever. Indeed,
> it wouldn't ever disappear just evolved (assuming we can figure out how
> to make it a) more powerful and (b) play more nicely with LiveCode's more
> modern features!).
>
> Warmest Regards,
>
> Mark.
>
> --
> Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
> LiveCode: Everyone can create apps
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."



More information about the use-livecode mailing list