IMicrosoft, Igalia kunye neBloomberg zicebisa ukuquka isivakalisi senkcazelo kwi-JS 

 

Microsoft, Igalia kunye neBloomberg Babhengeze kwiintsuku ezimbalwa ezidlulileyo ukuba bathathe inyathelo lokuqala lokubandakanya isintaksi kwingcaciso yodidi olucacileyo kwingcaciso IJavaScript, efana nesintaksi esetyenziswa kulwimi lweTypeScript.

Okwangoku, utshintsho lweprototype olucetywayo ukuba lufakwe kumgangatho we-ECMAScript luthunyelwe kwiingxoxo zokuqala (iSigaba 0).

Namhlanje siyavuya ukwazisa inkxaso yethu kunye nentsebenziswano kwisiphakamiso esitsha seNqanaba lokuzisa i-syntax yohlobo olukhethiweyo kunye nolucimeka kwiJavaScript. Ngenxa yokuba le syntax entsha ayinakutshintsha indlela ikhowudi ejikelezileyo eyenziwa ngayo, baya kwenza ngokufanelekileyo njengamagqabantshintshi. Sicinga ukuba oku kunamandla okwenza i-TypeScript ibe lula kwaye ikhawuleze ukuyisebenzisela uphuhliso kuzo zonke izikali. Singathanda ukuthetha malunga nokuba kutheni silandela oku kunye nendlela esi siphakamiso sisebenza ngayo kwinqanaba eliphezulu.

Kukhankanyiwe ukuba kwi-tUkuba nolwazi lohlobo olucacileyo kuya kuthintela iimpazamo ezininzi kwinkqubo yophuhliso, iya kunika ithuba lokusebenzisa iindlela zokuphucula ezongezelelweyo, ukwenza lula ukulungisa iimpazamo, kunye nokwenza ikhowudi ifundeke ngakumbi kwaye kulula kubaphuhlisi beqela lesithathu ukuguqula nokugcina.

ngaphandle koko kucetywa ukuphumeza uhlobo lwenkxaso njengomsebenzi onganyanzelekanga: Iinjini zeJavaScript kunye namaxesha okusebenza angaxhasi ukukhangela uhlobo aziyi kuzihoya izichasiselo ngolwazi lohlobo kwaye ziqhubekisele phambili ikhowudi njengangaphambili, ukubona uhlobo lwedatha njengamagqabantshintshi. Kodwa chwetheza izixhobo zokujonga ziya kuba nakho, ngokusekelwe kulwazi olukhoyo, ukufumanisa iimpazamo ezinxulumene nokusetyenziswa okungalunganga kweentlobo.

Imvelaphi
Umkhwa wamva nje obonwe liqela lethu kwihlabathi leJavaScript sisidingo sexesha elikhawulezayo lokuphindaphinda kunye nokunciphisa amanyathelo okwakha. Ngamanye amazwi, “yenza ikhawuleze kwaye ibelula”.

Ngandlel’ ithile, oku sele kusenzeka. Enkosi kwimpumelelo yezikhangeli ezihlala ziluhlaza, abaphuhlisi bahlala bekuphepha ukuhlanganisa iinguqulelo ezintsha zeJavaScript ukuze ziqhube kumaxesha akudala. Ukuya kumlinganiselo othile, okufanayo kuya ekuhlanganiseni: uninzi lwezikhangeli zinenkxaso eyakhelwe-ngaphakathi yokusebenzisa iimodyuli, ke ukudibanisa kunokubonwa njengenyathelo elingaphezulu lokuphucula kunesidingo. Oku kuye kwanda imeko, ke i-TypeScript ibamba njani?

Kwangelo xesha ngokungafaniyo nolwazi lohlobo oluchaziweyo ngokusebenzisa amanqakwana e-JSDoc achazwe njengezimvo, iinkcukacha ezithe ngqo lweentlobo ngokuthe ngqo kulwakhiwo lwenkcazo eguquguqukayo iya kwenza ikhowudi ibonakale ngakumbi, iqondakale kwaye kulula ukuyihlela.

Umzekelo, i-TypeScript-enabled IDEs iya kukwazi ukugqamisa ngokukhawuleza iimpazamo kwikhowudi ebhaliweyo yeJavaScript ngaphandle kweenguqu ezongezelelweyo. Ukongeza, inkxaso yohlobo olwakhelwe ngaphakathi iya kwenza ukuba kube lula ukuqhuba iinkqubo ezibhalwe kwiilwimi zeJavaScript ezibhalwe njenge-TypeScript kunye ne-Flow ngaphandle kokutshintshela kolunye ulwimi ukuya kolunye.

Kwiindidi, kucetywayo ukongeza "umtya", "inani" kunye ne "boolean", enokusetyenziswa xa kuchazwa iiguquguquko, iiparamitha zemisebenzi, izakhi zento, iindawo zeklasi, ii-arrays ezichwetheziweyo ("inombolo[]"). Kukwacetywa ukubonelela ngenkxaso kwiintlobo ezixubeneyo ("umtya | inombolo") kunye nejenerics.

Xa sijonga konke oku, siceba ukunikezela ngesi sindululo seNqanaba loku-1 kwintlanganiso yocweyo elandelayo kaMatshi ka-2022 ye-TC39. Siya kukwenza oko ngenkxaso kunye nesikhokelo soogxa bethu kwesi siphakamiso, uRob Palmer eBloomberg kunye noRomulo Cintra e-Igalia.

Ukufikelela kwiNqanaba loku-1 kuya kuthetha ukuba ikomiti yemigangatho ikholelwa ukuba uhlobo lwe-syntax oluhambelanayo lwe-ECMAScript lufanelekile ukuqwalaselwa. Le asiyonto iqinisekileyo: zininzi iimbono ezixabisekileyo ngaphakathi kwekomiti, kwaye silindele umlinganiselo othile wokuthandabuza. Isindululo esinje siya kufumana izimvo ezininzi kunye nokuphononongwa ngokufanelekileyo. Inokubandakanya utshintsho oluninzi loyilo endleleni kwaye kunokuthatha iminyaka ukufumana iziphumo.

kwintlanganiso elandelayo kaMatshi yekomiti ye-TC39, kucwangciswe ukuya kwinqanaba lokuqala ukuqwalaselwa kwesindululo ngokuthatha inxaxheba koluntu lweengcali zeECMA.

Gqibela Ukuba unomdla wokwazi okungakumbi ngayo, ungajonga iinkcukacha kwi ukulandela ikhonkco.


Umxholo wenqaku uyabambelela kwimigaqo yethu imigaqo yokuziphatha yokuhlela. Ukuxela impazamo cofa apha.

Yiba ngowokuqala ukuphawula

Shiya uluvo lwakho

Idilesi yakho ye email aziyi kupapashwa.

*

*

  1. Uxanduva lwedatha: UMiguel Ángel Gatón
  2. Injongo yedatha: Ulawulo lwe-SPAM, ulawulo lwezimvo.
  3. Umthetho: Imvume yakho
  4. Unxibelelwano lwedatha: Idatha ayizukuhanjiswa kubantu besithathu ngaphandle koxanduva lomthetho.
  5. Ukugcinwa kweenkcukacha
  6. Amalungelo: Ngalo naliphi na ixesha unganciphisa, uphinde uphinde ucime ulwazi lwakho.