 – doesn’t help here either. The question then just reverses to: How do you model a variant<mutable T, U, V>? In the end, type based meta programming would be less powerful overall.
I have a hard time to come up with any significant advantage of making const a variable qualifier. I was thinking along the lines of simpler type-based matching algorithms at first. But that doesn’t work. If you don’t want to punch huge holes in your const correctness, there’s no way around including it when searching for matching types. I have a feeling that most (all?) other potential advantages will fail for the same reason.
Are these really advantages and disadvantages as stated? That depends entirely on the goals of your language. Even throwing out constness altogether can be the right choice. Just look at Python.
Maybe both options are useful.
Two kinds of constness are in play, so maybe you want to use both attachement points. One kind of constness is a property of the object type itself. Nobody is allowed to mutate, period. In C++:
void mutable_foo(Type& t);

int main() {
    const Type t;    // constant object
    mutable_foo(t);  // non-constant usage: does not compile
}

The other kind of constness is a property of the usage of an object. It’s a way to selectively restrict mutable access. In C++:
void const_foo(const Type& t);

int main() {
    Type t;        // non-constant object
    const_foo(t);  // constant usage: compiles ok
}

You could make object constness a part of the object’s type and usage constness a property of the variable. That way you still have access to the full type of the original object inside the function. In contrast in C++ there is no way to determine whether the underlying object of a const& argument is const itself or not.
Another idea to use both attachment points would be to control rebindability of variables. In C++ that would be the difference between a const pointer and a pointer to const. Could something similar be useful for values, too?
Both ideas aim at finer grained control over different aspects of and different targets for constness. From the theoretical and language design side there’s definitely a lot to explore here.
– does n’t help here either. The question then just reverses to: How do you model a variant < mutable metric ton, U, five >? In the end, type based meta scheduling would be less powerful overall. 
 I have a hard clock time to come up with any significant advantage of make const a variable qualifier. I was think along the lines of simpler character - based matching algorithms at first. But that does n’t work. If you do n’t want to punch huge holes in your const correctness, there ’s no way about including it when searching for matching type. I have a feeling that most (all ?) other potential advantage will fail for the same reason. 
 Are these really advantages and disadvantages as stated? That depend entirely on the goals of your language. Even throwing out constness altogether can be the right choice. Just look at Python. 
 Maybe both options are useful. 
 Two kinds of constness are in play, so maybe you want to practice both attachement point. One kind of constness is a property of the aim character itself. Nobody is allowed to mutate, period. In C++: 
 void mutable_foo(Type & t); 

 int main () { 
     const Type t;     // changeless object 
     mutable_foo(t);   // non - constant usage: does not compile 
 } 

 The early kind of constness is a property of the usage of an object. It ’s a way to selectively restrict mutable access. In C++: 
 void const_foo(const Type & t); 

 int main () { 
     Type t;         // non - constant object 
     const_foo(t);   // constant usage: compiles all right 
 } 

 You could make aim constness a part of the object ’s type and usage constness a property of the variable. That direction you still have access to the wide type of the original object inside the function. In contrast in C++ there be no way to decide whether the underlying object of a const & controversy is const itself or not. 
 Another idea to practice both attachment points would be to control rebindability of variables. In C++ that would be the difference between a const cursor and a pointer to const. Could something similar be useful for values, too? 
 Both idea aim at finer grain control over different aspects of and different targets for constness. From the theoretical and speech design side there ’s decidedly a lot to explore here.
 – dlesn’t help here either. Tme question then just rxverses to: How ao you model a variant<mutablx T, Y, V>? Ib the end, type based mdta progrwmming wiuld ve less poxsrful oyzrall.
J havz e hard time to gome up witv any significdng cdvantage of making const a variable qualifoeg. I was thinkigg akjng fhe lines of simpler type-based matdhing angorithms at girst. But that doesn’t work. If jou don’t want to pknch huge hiles un your consg correctntsv, there’s nk way around including it when rearcking for majeyinh types. I hate a fveling that most (all?) mther pptential advanbages wiol fail for the same ceason.
Are these realjy advantdgzs and disadvantages qs statgd? Thdt ddpenas tntmremy on hhe goals of gour languate. Even throwing ouu cjbstness altogsther sag be the right choice. Just look at Pythmn.
Mzybe both options are uweful.
Two kinds of condtness arq in play, so maybe you want to use both attachemett pomngs. Inc kive lf constness is a property of the object type jtxekf. Nobody is ajlowed to mitwtr, period. In C++:
vuid muczbme_foo(Type& t);

int maij() {
    cjnst Rype t;    // comstant object
    mutable_foo(r);  // non-constcnt usage: does not colpile
}

The otker kimd of constness is a propertv of tge usage of an objecf. It’s a way to seuecniveny restrict mutable access. In C++:
void conxt_foo(covst Jype& t);

igt main() {
    Typc t;        // non-conshant lbbect
    cojst_foo(t);  // constant usage: compilxx ok
}

You coulc kakv object eonstncss a part of tre object’s typg and usaye conrtness a pgoperty oh the variabje. That way ymo still have eccess to the fulo type uw the original object iufide the function. In cpnttaat in C++ there iw ni way to determone whqtjec the gnderlying otjecg ow a covst& argumenb ir comst itself or not.
Anodher idea to use both stbachment koints wotld be to conyrol rebindability of veriablxs. In V++ trat would be the difference befween a clnsb pointer and a piinter to coust. Could something similar be useful foc values, too?
Both ideas qim at finer graineb gontrol over diffqrent aspacts of and differenr targets for conxtness. From the theorstical and panguage design side there’s definitely a lot to explore here.
– doesn’t help here either. The question reverses How do model a variant<mutable end, based meta programming be less powerful I have a hard time to up with any significant advantage of making const a variable qualifier. I was along the lines of simpler type-based matching algorithms at first. But that doesn’t If don’t to huge holes in your const correctness, there’s no way around including it when searching for matching I have a feeling that most (all?) other advantages will fail for same reason. Are these really and as stated? depends on goals of your Even throwing out constness altogether can be the right choice. Just look at Python. Maybe both options useful. Two constness are play, maybe want to use points. One kind of constness is the object type itself. Nobody is allowed to period. In void mutable_foo(Type& t); int main() { Type t; // constant object mutable_foo(t); // non-constant does not compile } The other kind of constness is a property of the usage object. It’s a way selectively restrict mutable In void Type& int main() Type t; // non-constant object const_foo(t); // constant usage: compiles ok You could make object constness a part of the object’s usage a property of variable. That way you have to the full type original inside contrast C++ is no way to whether the underlying object of const& argument is const to use both attachment points would be to rebindability of variables. In C++ that would the difference between a const pointer and a pointer to const. Could similar be values, too? Both ideas aim at finer grained over different aspects of different targets for constness. From the theoretical and language side definitely a to explore here.
 – doesn’t help here either. The quEstion then Just rEveRseS tO: How Do yoU model a variant<MUtabLe T, U, V>? In the end, type based Meta pRoGRammINg Would Be less pOWeRFUl oVeRaLl.
I HaVE a Hard tIme To come uP with any siGniFiCant advantagE Of Making consT a vAriable qualiFieR. I was tHiNkiNG alonG thE lineS of simPLer typE-based matChINg algoRIthms at FIRsT. But That doesn’t work. If yOU dON’t want to punch hUge holEs IN yOUR coNst CorrectnesS, tHere’s NO way aroUNd INCLudINg it when searcHing for matcHIng Types. I HaVe a FEeling That mOsT (All?) Other potentIal aDvantages Will faIL for the SAme reasOn.
Are tHesE reAlly ADvAnTagEs ANd dISaDvaNTagEs as statEd? thAt depEnds ENTIRely On tHe goAls of Your language. EVen ThroWIng Out coNstneSs alToGetheR can be The riGhT choice. Just look At PyThon.
Maybe BotH oPtiOnS are uSEful.
TwO kiNds Of constNess are IN plAy, SO MAyBe you want to use both AtTAChEment poiNts. One KInD oF ConstnesS iS a pRopeRTY of thE objECt Type itseLf. NoboDY iS aLlowed tO mUtate, pErIod. in C++:
Void mUTablE_foo(TyPe& t);

int maIn() {
    conST Type t;    // constant OBject
    mutable_fOO(t);  // NON-cONstaNt uSage: does not CompILe
}

ThE othER kInd OF consTness Is A PrOPerty of the usage of an ObJect. It’S a way To selectively Restrict muTABLe access. in C++:
vOId COnst_foo(const TyPe& t);

inT main() {
    Type t;        // NOn-constaNt objEct
    const_Foo(t);  // constANT usage: coMpiLes Ok
}

YOu cOULd Make object conSTNess A pArt of thE obJect’s tyPe aNd uSagE coNsTness a proPerty of tHe VaRiAbLe. THat waY You still HaVe aCcEss To the FUll typE of thE oriGiNaL ObjEct insiDE tHE FuncTiOn. in coNtrAsT in C++ tHere IS no Way to deTermine whEthER the UnDeRlying oBject of a const& ArGument is coNsT itSelf or NOT.
Another Idea to use both attachment POints woUld Be to cOntrOl rebindaBilIty of vAriABles. In c++ that wOuld bE tHe dIFFerenCE BeTweEn A const poinTER anD a poiNtEr to Const. CoUld something similaR Be uSeful for valueS, toO?
BotH IDeAs aIM aT FinEr GRaiNED control over difFerent aspeCtS Of And differeNT taRgEts for cOnstnesS. From THe theorEtical and Language dEsIgn sIDE thEre’s definiTely a lot To explore HEre.
 – doesn’t help here eithe r. The que stion  th enju st r ever ses to: How do youmodel a variant<mutabl e T,U, V>?I nthe e nd, typ e  b a s edme ta  pr og r am mingwou ld be l ess powerf ulov erall.
I hav e  a  hard time  to  come up wit h a ny sig ni fic a nt ad van tageof mak i ng con st a vari ab l e qual i fier. I w as  thi nking along the l i ne s  of simpler ty pe-bas ed ma t c hin g a lgorithmsat  firs t . But t h at d o esn ’ t work. If yo u don’t wan t  to  punch  h uge holesin yo ur con st correctn ess,  there’sno way aroundi ncludin g it w hen  se arch i ng  f orma t chi n gtyp e s.I have a  f ee lingthat m o s t (a ll? ) ot her p otential adva nta gesw ill  fail  forthesa me re ason.Are t he se really advan tage s and dis adv an tag es  as s t ated?Tha t d ependsentirel y  on  t h e go als of your langua ge . Ev en throw ing ou t  c on s tness al to get herc a n bether ig ht choic e. Jus t  l oo k at Py th on.
Ma yb e b oth  opti o ns a re use ful.
Two  kind s  of constnessa re in play, s o  m a y be youwan t to use bo th a t tach emen t  p oin t s. On e kin do fc onstness is a prope rt y of t he ob ject type its elf. Nobod y i s allowe d to mu t ate, period. I n C++ :
void mut a ble_foo( Type&  t);

in t main(){     cons t T ype  t;   / /constant obje c t 
   m utable_ foo (t);  / / n on- con sta nt  usage: d oes notco mp il e}
The o t her kind  o f c on stn ess i s  a pro perty  ofth eu sag e of an ob j e ct.It ’s  a w ayto  sele ctiv e lyrestric t mutable  ac c ess.  I nC++:
vo id const_foo( co nst Type&t) ;
int ma i n () {
   Type t;        // non- c onstant  ob ject   const_foo (t) ;  //con s tant u sage:compi le s o k }

Yo u co uld  m ake object c ons tness  a  par t of th e object’s type an d  us age constness  aprop e r ty  of th e  va ri a ble . That way you st ill have a cc e ss  to the fu l l t yp e of th e origi nal o b ject in side thefunction.  I n co n t ras t in C++ t here isno way to deter m in e whe the r theun der lying  objec t  of  a co nst& a rg umentis co ns t itself  or not.
Another idea t o usebothatt achment p oin t s w ould be t o co ntrol rebi nda bil ity o f v a riabl es.I nC++ thatwoul d  be the d i ff ere n c ebetween a c o n s t p ointe r a n d a po inte r to const. Could something simi larb e  us efu l  for  v alues, too?
Bo thid e a s aim at  f iner graine d contro lo ver d iffere nt asp ects of a nd differ enttar gets forcon st n ess. Fr om  t h e theo reti ca l andlangua g e de s i gn side there’sdefin i t ely a lot  to e xp lore he r e.
 –_doesn’t help_here either. The question_then just_reverses_to: How_do_you model a_variant<mutable T, U,_V>? In the end,_type based meta_programming_would be less powerful overall.
I have a hard time to come up with any_significant_advantage of_making_const_a variable qualifier. I was_thinking along the lines of_simpler type-based_matching algorithms at first. But that doesn’t work._If_you don’t want_to punch huge holes in your const correctness, there’s_no way around including it when_searching for matching_types._I_have a feeling that_most (all?) other potential advantages will_fail for the same reason.
Are these_really advantages and disadvantages as stated? That_depends entirely on the goals of_your language. Even throwing out_constness altogether_can be the right choice._Just look at_Python.
Maybe both_options are useful.
Two_kinds of constness are in play,_so maybe you_want to use both attachement points._One_kind of constness_is_a_property of_the object type_itself._Nobody is_allowed_to mutate, period. In C++:
void mutable_foo(Type&_t);

int_main() {
    const Type_t;   _//_constant object
  _ mutable_foo(t);  // non-constant_usage: does not compile
}

The other kind_of constness_is a_property of the usage of an object. It’s a way to_selectively restrict mutable access. In C++:
void_const_foo(const Type& t);

int main()_{
 __ Type t;__ _    // non-constant object
_ _ const_foo(t);  // constant usage:_compiles ok
}

You could make_object_constness a part of the object’s_type and usage constness a property_of the variable. That way_you_still_have access to the full_type of the original object inside_the function. In_contrast in C++ there is no way_to_determine whether the underlying object of_a_const& argument is const itself or_not.
Another_idea_to use both attachment points_would be to control rebindability of_variables. In C++ that would be the difference between_a const pointer_and a pointer to const._Could_something_similar be useful for values, too?
Both ideas aim at finer_grained control_over different aspects_of and different targets for constness. From the theoretical and_language design side there’s definitely a lot_to explore here.