[fpc-pascal] Underscores in numerical literals - grouping

Dmitry Boyarintsev skalogryz.lists at gmail.com
Tue Nov 22 00:59:33 CET 2016


On Mon, Nov 21, 2016 at 9:46 AM, Graeme Geldenhuys <
mailinglists at geldenhuys.co.uk> wrote:

> I don't know about you, but I like this idea implemented in Java 7 and
> later.
>
> http://jasdhir.blogspot.co.uk/2016/11/using-underscores-in-literals.html
>
>
> I always find it hard to read long numeric literals.
>

I find it a made up problem, inspired by sales department.

The site shows CC-card and SSN number stored as numerics. I doubt there's
ever a task that actually needs such storage (since both numbers should be
considered as a set of characters ie strings).

Maybe its a new feature that will inspire people to use more anonymous
constants.
They looked ugly before, but look how cute they look now if underscores.

Having pure-functions available for pascal constant expressions is far more
preferred than underscores.
And it will also might make them even more readable and flexible.

thanks,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20161121/e42629c5/attachment.html>


More information about the fpc-pascal mailing list