DMD backend quality (Was: Re: DIP 1031--Deprecate Brace-Style Struct Initializers--Community Review Round 1 Discussion)

Max Samukha maxsamukha at gmail.com
Thu Feb 20 11:24:04 UTC 2020


On Thursday, 20 February 2020 at 10:36:35 UTC, Walter Bright 
wrote:
> On 2/20/2020 2:08 AM, Max Samukha wrote:
>> We encountered a case recently where we wanted to inline one. 
>> It was trivial to work around, though.
>
> I'm interested in evaluating common cases that don't inline but 
> should.

Trivial functions that use a 'switch' to check membership in a 
small set of constants are still quite common I think, such as:

bool isReserved(char c) {
         switch (c) {
             case ':', '/', '?'...:
                 return true;
             default:
                 return false;
         }
}


More information about the Digitalmars-d mailing list