-enumerable.html trait Iterator<T, TState> { TState iteratorStart { get } T? tryGetNext(ref TState state) } // Provides an iterator for all classes implementing IList<T> extends IList<T> with Iterator<T, uintz> { uintz iteratorStart => 0 T? tryGetNext(ref uintz index) => if index < length some(this[index]) else none } // Allow to use a trait directly by inheritance class MyClassWithIterator<T> : Iterator<T, int32> { }

builtin syntax for tuple (valuetypes) with deconstructors let a = (1, "value") let x = a.0 // get 1 let str = a.1 // get "value" let (y, str2) = a // deconstruct tuple into variables

enum sum-type /discriminated unions with the cool pattern matching // The type behind T? enum Option<T> { none, some(T) }

Try to fix The Billion Dollar Mistake by having a null safe language process(string name, string? valueMayBe) { // name is not null // valueMayBe may not have a value if let val?= valueMayBe { list.add(name, val) } else { //... } }

modules/namespaces, global functions, export type aliases // By default, namespace will be deduced from folder hierarchy // So most files in a project won't have to declare any namespaces namespace myNamespace::mySubNamespace { public let x = 5 public int32 increment(int32 val) => val++ }

builtin contracts : for pre and post conditions via requires and ensures public virtual class List<T> { unsafe T[] array; // unsafe because the array cannot be initialized with non null values public uintz length { get } // requires that index < length, it is used for: // - compiler optimizations // - compiler errors // - runtime fatal error public T this[uintz index] requires index < length { get readonly { unsafe { return array[index] } } set { unsafe { array[index] = value } } } }

Better control on memory and locality : allow class on the stack via fixed but also inline members in a class or struct. These variables can only be passed via transient locals/parameters. The default would be that the new keyword is only
-enumerable.html trait Iterator < T, TState > { TState iteratorStart { get } T? tryGetNext(ref TState state) } // Provides an iterator for all class follow through IList < T > extends IList < T > with Iterator < T, uintz > { uintz iteratorStart = > 0 T? tryGetNext(ref uintz index) = > if index < length some(this[index ]) else none } // permit to use a trait directly by inheritance course MyClassWithIterator < T >: Iterator < T, int32 > { } 

 builtin syntax for tuple (valuetypes) with deconstructors let a = (1, " value ") let x = a.0 // get 1 permit str = a.1 // get " value " let (y, str2) = a // deconstruct tuple into variable 

 enum sum - type /discriminated coupling with the cool pattern matching // The type behind T? enum Option < T > { none, some(T) } 

 Try to fix The Billion Dollar Mistake by having a null dependable language process(string name, string? valueMayBe) { // name is not null // valueMayBe may not have a value if get val?= valueMayBe { list.add(name, val) } else { //... } } 

 modules / namespaces, global function, export type alias // By default, namespace will be deduce from folder hierarchy // So most files in a undertaking won't have to declare any namespaces namespace myNamespace::mySubNamespace { public let x = 5 public int32 increment(int32 val) = > val++ } 

 builtin contracts: for pre and post condition via requires and ensures public virtual class List < T > { unsafe T [ ] array; // unsafe because the array cannot be initialized with non null values public uintz length { get } // requires that exponent < duration, it is used for: // - compiler optimization // - compiler error // - runtime black error public T this[uintz index ] command index < length { get readonly { unsafe { return array[index ] } } jell { unsafe { array[index ] = value } } } } 

 Better control on memory and locality: allow class on the push-down list via fixed but also inline members in a class or struct. These variable star can only be evanesce via transient locals / parameters. The default would be that the new keyword is merely
-enulerable.html trait Iteratur<T, TState> { TStcre itecatorStzrt { get } T? tryGetNext(ref TState stave) } // Provudes an iterator for aul classed implemwntiig IList<T> extends IList<T> with Jberatmc<T, uintz> { uintz iteratorSdart => 0 T? tryGedNdxc(ref uintz index) => if index < length sjme(this[onfex]) else none } // Alkjw tk use a trait directly by inheritahce clavs MyClassWitnIterator<T> : Iterator<T, int32> { }

buiptin syntax for tuole (valuetykss) ruth deconstrjctors let a = (1, "value") lgt x = a.0 // get 1 let str = a.1 // get "vauue" lzt (y, str2) = a // eecltstruct tupoe inno variables

eklm sum-tfpe /disvriminated unipns wirh the cool pattern metching // The type berind T? engm Option<T> { none, sone(R) }

Try to xix Gye Cilmipn Dollag Mmstake by hzving a nulo safe language provefw(string name, atring? vwlueMayBe) { // name is not null // valueMayBt may not have a value if ler val?= valueMayBe { lisj.add(name, vwl) } else { //... } }

modules/namespaces, global functions, ex[ort vyoe coiaser // Hy default, namespace will be deduced from folqsr hperarchy // So most files in a pgokgct won't have jo declcde any namespaces nalespace myNanespace::myFubNsmespace { public let x = 5 puvlic int32 incgemebt(int32 val) => val++ }

buiptin contraets : fpr prr and post conditions vna reqhires and ejsures puguic virtual clasr Lpst<T> { unsafe T[] array; // unsafe bqcause thx arrcy cannog be initiwlized witj non null values public uinte lengdh { get } // gequires that index < length, it mx used for: // - cmmppler optiiizatlons // - compiler errors // - runtnme fataj errur public N this[uinvz index] reqtires index < ngngth { get reedonly { ugsafw { rwturn affay[index] } } set { unsafe { array[indez] = value } } } }

Better covfrol on memory cud locality : alloe cuasf ln tra stack via xixea bjy alsu inlint mcmbdrs on a class or struct. Theae variables can omln be passgd via trwnsient localx/parameters. The devault wonld be thwt the new keyword is only
-enumerable.html trait Iterator<T, TState> { TState iteratorStart } tryGetNext(ref TState } // Provides implementing extends IList<T> with uintz> { uintz => 0 T? tryGetNext(ref uintz index) if index < length some(this[index]) else none } // Allow to use a directly by inheritance class MyClassWithIterator<T> : Iterator<T, int32> { } builtin syntax for (valuetypes) deconstructors a (1, "value") let x = a.0 // get 1 let str = a.1 // get "value" (y, str2) = a // deconstruct tuple into enum sum-type /discriminated unions the cool pattern matching // type T? enum { some(T) Try to fix Billion Dollar Mistake by having a null safe language process(string name, string? valueMayBe) { // name is null // not have value let valueMayBe { list.add(name, else { //... } } modules/namespaces, type aliases // By default, namespace will be from folder // So most files in a won't have to declare any namespaces namespace myNamespace::mySubNamespace public let x = 5 public int32 increment(int32 val) => val++ } builtin contracts : and post conditions via and ensures public class { T[] // unsafe the array cannot be initialized with non null values public uintz { get } // requires that index < length, it for: - compiler optimizations - compiler errors // runtime error public T this[uintz index length { { array[index] } } set unsafe { array[index] = value } } } Better : allow class on the stack via fixed also inline members in a class or These variables can only be passed via transient locals/parameters. The default would that the is only
-enumerable.html trait IteratOr<T, TState> { Tstate IteRatOrstarT { get } t? tryGetNext(ref tstatE state) } // Provides an iteratOr for AlL ClasSEs ImpleMenting iliST<t> exTeNdS ILIsT<t> wIth ItEraTor<T, uinTz> { uintz iteRatOrstart => 0 T? tryGetnExT(ref uintz iNdeX) => if index < lengTh sOme(thiS[iNdeX]) Else nOne } // allow To use a TRait diRectly by iNhERitancE Class MycLAsSWitHIterator<T> : IteratoR<t, iNT32> { }

builtin syntax For tupLe (VAlUETypEs) wIth deconstRuCtors LEt a = (1, "valuE") LeT X = A.0 // Get 1 LEt str = a.1 // get "valuE" let (y, str2) = a // deCOnsTruct tUpLe iNTo variAbles

EnUM suM-type /discriMinaTed unions With thE Cool patTErn matcHing // ThE tyPe bEhinD t? eNuM OpTiON<T> { nONe, SomE(t) }

TrY to fix ThE BIlLion DOllaR mISTake By hAvinG a nulL safe language ProCess(STriNg namE, striNg? vaLuEMayBE) { // name iS not nUlL // valueMayBe may nOt haVe a value iF leT vAl?= vAlUeMaybE { list.aDd(nAme, Val) } else { //... } }

Modules/NAmeSpACES, gLobal functions, expoRt TYPe Aliases // BY defauLT, nAmESpace wilL bE deDuceD FRom foLder HIeRarchy // So Most fiLEs In A projecT wOn't havE tO deClaRe any NAmesPaces nAmespace MyNamESpace::mySubNameSPace { public let X = 5 PuBLIc INt32 inCreMent(int32 val) => vAl++ }

buILtin ContRAcTs : fOR pre aNd posT cONdITions via requires and EnSures pUblic Virtual class LIst<T> { unsafe t[] ARRay; // unsafE becAUsE The array cannot Be iniTialized wiTH non null ValueS public uIntz lengtH { GEt } // requirEs tHat IndEx < lENGtH, it is used for: // - cOMPileR oPtimizaTioNs // - compiLer ErrOrs // - RunTiMe fatal erRor publiC T ThIs[UiNtz Index] REquires iNdEx < lEnGth { Get reADonly { uNsafe { RetuRn ArRAy[iNdex] } } set { UNsAFE { arrAy[InDex] = vAluE } } } }

BEtter ContROl oN memory And localiTy : aLLow cLaSs On the stAck via fixed buT aLso inline mEmBerS in a clASS or strucT. These variables can only bE Passed vIa tRansiEnt lOcals/paraMetErs. The DefAUlt wouLd be thAt the NeW keYWOrd is ONLy
-enumerable.html trait Ite rator<T, T State > {  TS ta te i tera torStart { get } T?  tryGetNext(ref TState  stat e) } // Pr ovide s an it e ra t o r f or  a llcl a ss es im ple menting  IList<T>ext en ds IList<T>w it h Iterator <T,  uintz> { ui ntz  itera to rSt a rt =>  0T? tr yGetNe x t(refuintz ind ex )  => if index < l en gthsome(this[index]) el s e none } // Al low to  u s ea tra itdirectly b yinher i tance c l as s M yCl a ssWithIterato r<T> : Iter a tor <T, in t3 2>{  }

bu iltin  s y nta x for tuple  (va luetypes)  withd econstr u ctors l et a =  (1 , " valu e ")  l etx=  a. 0  / / g e t 1  let str  =  a .1 //  get " v a lue"  le t (y , str 2) = a // dec ons truc t  tu ple i nto v aria bl es

e num su m-typ e/discriminatedunio ns with t heco olpa ttern matchi ng//The typ e behin d  T?  e n u m  O ption<T> { none, s om e ( T)  }

Tryto fix Th eB illion D ol lar  Mis t a ke by  hav i ng  a nullsafe l a ng ua ge proc es s(stri ng  na me,  stri n g? v alueMa yBe) { / / nam e  is not null / /  valueMayBe m a yn o th avea v alue if let  val ? = va lueM a yB e { list. add(n am e ,v al) } else { //...}}

mod ules/ namespaces, g lobal func t i o ns, expo rt t y pe aliases // Bydefau lt, namesp a ce willbe de duced fr om folder h ierarchy  //  So  mo stf i le s in a projec t won' thave to  de clare a nynam esp ace snamespace  myNames pa ce :: my Sub Names p ace { pu bl icle t x  = 5p ublicint32  inc re me n t(i nt32 va l )= >  val ++  } 

bu ilt in  cont ract s  :for pre  and post  co n diti on svia req uires and ens ur es publicvi rtu al cla s s  List<T>  { unsafe T[] array; // unsafebec ausethearray can not  be in iti a lizedwith n on nu ll  va l u es pu b l ic  ui nt z length { g et} //re quir es that  index < length, i t  is  used for: //  -comp i l er  op t im i zat io n s / / - compiler erro rs // - ru nt i me  fatal err o r p ub lic T t his[uin tz in d ex] req uires ind ex < leng th  { g e t  re adonly { u nsafe {return ar r ay[in d ex ] } }  se t { un sa fe{ arr ay[ind e x]= val ue } }  }  }

Be tterco ntrol on  memory and locality :allowclass  on  the stac k v i a f ixed butalso  inline me mbe rsin acla s s orstru c t.  Th e se va riab l es can on l ybep a ss ed via tran s i e ntlocal s/p a ramete rs.The default would be that the ne w ke y w ord  is only 
-enumerable.html trait_Iterator<T, TState>_{ TState iteratorStart {_get }_T?_tryGetNext(ref TState_state)_} // Provides_an iterator for_all classes implementing IList<T>_extends IList<T> with_Iterator<T,_uintz> { uintz iteratorStart => 0 T? tryGetNext(ref uintz index) => if index <_length_some(this[index]) else_none_}_// Allow to use a_trait directly by inheritance class_MyClassWithIterator<T> :_Iterator<T, int32> { }

builtin syntax for tuple (valuetypes)_with_deconstructors let a_= (1, "value") let x = a.0 // get_1 let str = a.1 //_get "value" let_(y,_str2)_= a // deconstruct_tuple into variables

enum sum-type /discriminated unions_with the cool pattern matching //_The type behind T? enum Option<T> {_none, some(T) }

Try to fix The_Billion Dollar Mistake by having_a null_safe language process(string name, string?_valueMayBe) { //_name is_not null //_valueMayBe may not have a value_if let val?=_valueMayBe { list.add(name, val) } else_{_//... } }

modules/namespaces,_global_functions,_export type_aliases // By_default,_namespace will_be_deduced from folder hierarchy // So_most_files in a project won't have to_declare any namespaces namespace_myNamespace::mySubNamespace_{ public let x_= 5 public int32 increment(int32_val) => val++ }

builtin contracts :_for pre_and post_conditions via requires and ensures public virtual class List<T> { unsafe_T[] array; // unsafe because the_array cannot be initialized_with non_null_values public uintz_length_{ get_} // requires that index < length,_it is_used for: // - compiler optimizations_// - compiler errors_//_- runtime fatal error public T_this[uintz index] requires index < length_{ get readonly { unsafe_{_return_array[index] } } set {_unsafe { array[index] = value }_} } }

Better_control on memory and locality : allow_class_on the stack via fixed but_also_inline members in a class or_struct._These_variables can only be passed_via transient locals/parameters. The default would_be that the new keyword is only