bool concat patternmatching with switch
monkyyy
crazymonkyyy at gmail.com
Wed May 29 18:41:46 UTC 2024
On Wednesday, 29 May 2024 at 08:59:10 UTC, Dennis wrote:
> On Tuesday, 28 May 2024 at 19:39:45 UTC, monkyyy wrote:
>> I propose syntax sugar where if you pass multible bools (and
>> maybe small enums), it will bitshift theses into int and call
>> the same basic asm pattern c used for its switch statements.
>
> Something like that happens in DMD's source with an `X`
> function:
>
> https://github.com/dlang/dmd/blob/d1f5a7ebd251b3df263a3c6ff87cac4aa9be309c/compiler/src/dmd/e2ir.d#L4770-L4792
>
> You could generalize it up to 64 bits that way.
I really dont understand the compilers code, is `X` exposed to a
user ever?
More information about the dip.ideas
mailing list