On 30/07/2021 18:24, Kirill Nesmeyanov wrote:
enum ErrorGroup: int
{
case NOTICE = 0;
case WARNING = 10;
case ERROR = 20;
}
enum ErrorCode: int
{
case UNKNOWN = 0;
case A = ErrorGroup::NOTICE + 1;
case B = ErrorGroup::NOTICE + 2;
case С = ErrorGroup::
>Пятница, 30 июля 2021, 16:45 +03:00 от Rowan Tommins :
>
>On 30/07/2021 13:20, Kirill Nesmeyanov wrote:
>> But in addition to bit-masks, there are also at least cases of addition and
>> subtraction (the most popular). Can't we adapt all math expressions existing
>> in nature to specific cases,
On 30/07/2021 13:20, Kirill Nesmeyanov wrote:
But in addition to bit-masks, there are also at least cases of addition and
subtraction (the most popular). Can't we adapt all math expressions existing in
nature to specific cases, thereby building our own pseudo-AST?
(Some::A + Some::B) * Some:
>Пятница, 30 июля 2021, 13:46 +03:00 от Marc Bennewitz :
>
>
>On 30.07.21 02:01, Кирилл Несмеянов wrote:
>> Yes, I saw this short description in your RFC (
>> https://wiki.php.net/rfc/enumerations ) about «enum sets». However, I do not
>> quite understand why we can not now add a cast to scalar
On 30.07.21 02:01, Кирилл Несмеянов wrote:
Yes, I saw this short description in your RFC (
https://wiki.php.net/rfc/enumerations ) about «enum sets». However, I do not
quite understand why we can not now add a cast to scalars (string and int) and
math expressions, which would solve this prob
>>
>> Hello internals! I apologize if such a discussion has already taken
>> place, but I didn't find anything like it.
>>
>> When working with enums, I ran into problems that are currently not
>> resolved. In some cases, enumerations require self references and
>> constant arithmetic expression
On Thu, Jul 29, 2021, at 5:16 PM, Кирилл Несмеянов wrote:
>
> Hello internals! I apologize if such a discussion has already taken
> place, but I didn't find anything like it.
>
> When working with enums, I ran into problems that are currently not
> resolved. In some cases, enumerations require
Hello internals! I apologize if such a discussion has already taken place, but
I didn't find anything like it.
When working with enums, I ran into problems that are currently not resolved.
In some cases, enumerations require self references and constant arithmetic
expressions:
enum Example: