redefine_constants_exception_strawpoll
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
redefine_constants_exception_strawpoll [2022/01/23 03:03] – created marandall | redefine_constants_exception_strawpoll [2022/01/23 03:31] (current) – marandall | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Straw Poll: Redefine Constants Exception ====== | ||
+ | * Date: 2022-01-23 | ||
+ | * Author: Mark Randall, marandall@php.net | ||
+ | * Status: Strawpoll | ||
+ | |||
+ | There have been a discussions in the past about upgrading the attempted redeclaration of constants to be an exception (ValueError). | ||
+ | Here is one from 2016 from Dmitry: | ||
+ | https:// | ||
+ | |||
+ | Discussion: | ||
+ | https:// | ||
+ | |||
+ | Since this RFC was made in 2016, attempted redeclaration was promoted to a warning instead of a notice. | ||
+ | |||
+ | As internals has been making efforts in recent years to move towards saner error handling this seems like a suitable candidate for tightening up, so I would like to collect opinions on how many people would be in favour of bumping this warning once more up to an exception (likely a ValueError) on the basis that attempting to redefine a constant is impossible, so is a programming error. | ||
<doodle title=" | <doodle title=" |
redefine_constants_exception_strawpoll.1642907022.txt.gz · Last modified: 2022/01/23 03:03 by marandall