Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112481 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 94974 invoked from network); 10 Dec 2020 05:49:02 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 10 Dec 2020 05:49:02 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id EA74D1804D8 for ; Wed, 9 Dec 2020 21:18:38 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from dormouse.elm.relay.mailchannels.net (dormouse.elm.relay.mailchannels.net [23.83.212.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 9 Dec 2020 21:18:37 -0800 (PST) X-Sender-Id: s0seqk11zu|x-authuser|lester@lsces.uk Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id B294E3417A1 for ; Thu, 10 Dec 2020 05:18:36 +0000 (UTC) Received: from cp9.ukdns.biz (100-96-12-130.trex.outbound.svc.cluster.local [100.96.12.130]) (Authenticated sender: s0seqk11zu) by relay.mailchannels.net (Postfix) with ESMTPA id 592AC341509 for ; Thu, 10 Dec 2020 05:18:35 +0000 (UTC) X-Sender-Id: s0seqk11zu|x-authuser|lester@lsces.uk Received: from cp9.ukdns.biz (cp9.ukdns.biz [95.215.224.60]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.11); Thu, 10 Dec 2020 05:18:36 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: s0seqk11zu|x-authuser|lester@lsces.uk X-MailChannels-Auth-Id: s0seqk11zu X-Juvenile-Bitter: 78644ab20052b81b_1607577516167_2282561424 X-MC-Loop-Signature: 1607577516167:4157010771 X-MC-Ingress-Time: 1607577516167 Received: from host86-157-205-21.range86-157.btcentralplus.com ([86.157.205.21]:44244 helo=[192.168.1.116]) by cp9.ukdns.biz with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1knELU-00DHXm-M6 for internals@lists.php.net; Thu, 10 Dec 2020 05:18:28 +0000 To: internals@lists.php.net References: Message-ID: <5ab79614-97dc-b064-18dc-8a5b20d251a5@lsces.uk> Date: Thu, 10 Dec 2020 05:18:27 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.3 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-thewebhostserver-MailScanner-Information: Please contact the ISP for more information X-thewebhostserver-MailScanner-ID: 1knELU-00DHXm-M6 X-thewebhostserver-MailScanner: Found to be clean X-thewebhostserver-MailScanner-SpamCheck: X-thewebhostserver-MailScanner-From: lester@lsces.uk X-AuthUser: lester@lsces.uk Subject: Re: [PHP-DEV] [RFC] Enumerations From: lester@lsces.uk (Lester Caine) 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