On 04/12/2020 23:24, Larry Garfield wrote:
The first step, for unit enumerations, is here:
https://wiki.php.net/rfc/enumerations
There's still a few bits we're sorting out and the implementation is mostly 
done, but not 100% complete.

I use 'Enumerations' quite extensively but have not found the lack of a hard coded base for that a limitation at least partially because as provided in databases the fundamental restrictions that imposes make using them something of a 'bodge job'.

There are two areas I would highlight as causing problems. ...

1/ Dynamic Enumerations ... where the application may need to add or delete values over time. I have a number of tables in the database which provide a dynamic list of elements which are used to provide the lists inside the PHP functionality. These are invariably managed by a numeric index in addition to the text of each item, and historic values remain in the database flagged as inactive.

2/ An area that PHP remains poor at supporting, internationalization. Since the vast number of end users do not have English as a first language, then translations of the enumeration values becomes essential and the table approach obviously works nicely here since one simply provides multiple sets of text in parallel and select the language needed as an option.

I am not saying that there is anything wrong with the proposal, only that as with many aspects being proposed these days, there is a distinct lack of consideration on just how some aspects of their use can be expanded to cover internationalization and the example in the RFC has no obvious way of supporting a different language?

--
Lester Caine - G8HFL
-----------------------------
Contact - https://lsces.uk/wiki/Contact
L.S.Caine Electronic Services - https://lsces.uk
Model Engineers Digital Workshop - https://medw.uk
Rainbow Digital Media - https://rainbowdigitalmedia.uk

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to