Switch ignores case (?)

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Nov 23 14:13:38 PST 2016


On Wednesday, 23 November 2016 at 22:00:58 UTC, Steven 
Schveighoffer wrote:
> I can't see why you need to deal with the glue layer at all -- 
> just tell the glue layer that it's a list of strings and not 
> dstrings ;)

'cause that is how s2ir.d is done in dmd. ;-) it actually sorts 
*objects*, and objects knows how to order 'emselves. at this 
stage it is not trivial to treat objects as byte arrays (easy, 
but not a one-liner).

sure, other compilers may do that differently, and it doesn't 
really matter how exactly the code for switch is generated until 
it works correctly. ;-)


More information about the Digitalmars-d-learn mailing list