Does remove immutability using cast to pass in a function make sense?
    AsmMan via Digitalmars-d-learn 
    digitalmars-d-learn at puremagic.com
       
    Mon Sep 22 19:07:08 PDT 2014
    
    
  
I have this array:
static immutable string[] months = ["jan", "fev", ...];
I need to pass it into canFind(). But it doesn't works with 
immutables so I need to cast it like in canFind(cast(string[]) 
months, month) to work. There's a reason related to design why it 
doesn't work with immutables or a function just wasn't written?
What I want to know is if I'm doing something wrong in casting it 
to work. I know from C which such casts should be done carefully
    
    
More information about the Digitalmars-d-learn
mailing list