Iyo nyowani vhezheni yeDart 2.12 yakaburitswa uye inosvika neNull Safety uye FFI

Inoteverwa neyapfuura kuburitswa kweshanduro nyowani yeFlutter 2, Google yakaburitsawo posvo (inenge panguva imwe chete) yekuvhurwa kweshanduro nyowani programming mutauro Dhart 2.12, mune iko kuvandudzwa kweakagadziriswa Dart 2 bazi kunoenderera.

Kune avo vasingazive Dart (pakutanga yainzi Dash) vanofanirwa kuziva kuti ichi chakavhurika sosi programming mutauro, wakagadzirwa neGoogle.

Nezve Dart

Dart yakagadzirirwa kupa mibairo iri nani kuburikidza nedzimwe nzira kune mamwe matambudziko e JavaScript, kunyangwe paine chokwadi chekuti mumharidzo yake hapana mareferenzi akajeka akaitwa JavaScript. Yakagadzirirwa kuve chishandiso chakareruka kune makuru mapurojekiti uye nekupa zvirinani kuchengetedzeka.

Iyo poindi yeDart haisi kutsiva JavaScript semutauro mukuru wepurogiramu yewebhu mumabhurawuza ewebhu, asi kupa imwe yemazuva ano imwe nzira. Mweya wemutauro unogona kuoneka uchiburitswa mune zvataurwa naLars Bak, Google software injinjini, uyo anotsanangura Dart se "mutauro wakarongeka asi wakasanduka weWebhu kuronga"

Pakati peakasiyana maficha Dart anosimbisa zvinotevera:

  • Laptop: ari macompiler anoshanda anogadzira x86 uye ARM kodhi yemuchina yemidziyo uye JavaScript yakagadzirirwa webhu. Mhando dzakasiyana dzezvinangwa zvinotsigirwa: nharembozha, maPC desktop, zvinoshandiswa kumashure, uye nezvimwe. Iyo yakazara seti yemaraibhurari uye mapakeji inopa anoenderana APIs anoshanda pamatanho mapuratifomu, achiwedzera kudzikisa mutengo wekuvaka wechokwadi muchinjika-chikuva kunyorera.
  • Kubudirira: iyo dart chikuva inogonesa kukurumidza uye iterative kusimudzira zvese zvemidziyo yechinyakare uye yewebhu. Uye Dart inopa zvakapfuma zvekuvaka senge zvoga uye async / kumirira kubata zvakajairika mapatani eanowirirana uye zviitiko zvinotungamirwa zvinoshandiswa.
  • Yakasimba: Dart's null-safe system inoona zvikanganiso panguva yekusimudzira. Y chikuva chakazara chinotyisa uye chakavimbika, mukushandisa kwekugadzira kweanopfuura makore gumi nemhando dzakasiyana siyana dzekushandisa, kusanganisira bhizinesi-rakakomba manyorerwo senge Google Ads uye Google Mubatsiri.

Chii chitsva muDart 2.12?

Kuburitswa uku inomira kusimudzira kwe "Null" modhi yekuchengetedza (Null Kuchengetedza), iyo inodzivirira tsaona dzinokonzerwa nekuedza kushandisa akasiyana kukosha kwayo kusingatsanangurwi uye kumisikidzwa ku "Null" sezvo ichizobvumira vanogadzira kuti vaone zviri nyore zvikanganiso panguva yekusimudzira. Pakutanga, zvaive zvakaoma kusiyanisa pakati pekodhi iyo yaifungidzira kupfuura seyakavanzika nekodhi iyo yaisashanda nemabhuruku.

Ndinoreva zvinoreva kuti misiyano haigone kuve nehunhu kukosha kunze kwekunge yagoverwa zvakajeka kukosha kwakashata. Iyo modhi inonyatso kufunga nezvemhando dzakasiyana, ichibvumira iyo compiler kuisa mamwe ekuwedzera. Type conformance inoongororwa panguva yekubatanidza, semuenzaniso, kuyedza kupa "Null" kukosha kune chinosiyana nerudzi rwusingareve nyika isina kujekeswa, senge "int", ichaunza kukanganisa. Kuchengetedza kweNull shanduko huru mumutauro uye zvinoda dzimwe shanduko kana uchinyora.

Kumwe kukura kukuru muDart 2.12 ndiko kugadzikana kwekumisikidza kweFFI raibhurari que inokutendera iwe kuti ugadzire yakakwira-kuita kodhi kubva kwaunogona kuwana iyo C APIs, kubvira FFI inobvumidza kupfuura zvivakwa nemitengo uye kwete chete nezvakataurwa

Pane dzimwe shanduko dzinobuda pachena:

  • Zvivakwa zvakavakirwa, zvakajairika muC, izvozvi zvinotsigirwa naDart FFI.
  • Kuita uye saizi optimization zvakagadzirwa.
  • Zvishandiso zvekuvandudza uye kodhi yekunyora kodhi yakanyorwa neFlutter yakawedzerwa, pamwe nema plugins matsva ekuvandudza kunyorera muDart uye Flutter yeiyo Android Studio / IntelliJ uye VS Code.

Pazvirongwa zvenguva yemberi zveDart mune zvese zvinotaurwa kuti mune inotevera vhezheni vanozotarisa zvakanyanya pakuwedzera mitauro shanduko, senge mhando ma aliases, katatu switch switch opareta, generic metadata zvirevo uye static metaprogramming.

Finalmente kana iwe uchifarira kuziva zvakawanda nezvazvo Nezve iyi vhezheni nyowani yemutauro wechirongwa, unogona kutarisa iwo madhiri Mune inotevera chinongedzo.

 


Izvo zviri muchinyorwa zvinoomerera pamisimboti yedu ye tsika dzekunyora. Kuti utaure chikanganiso tinya pano.

Iva wekutanga kutaura

Siya yako yekutaura

Your kero e havazobvumirwi ichibudiswa.

*

*

  1. Inotarisira data: AB Internet Networks 2008 SL
  2. Chinangwa cheiyo data: Kudzora SPAM, manejimendi manejimendi.
  3. Legitimation: Kubvuma kwako
  4. Kutaurirana kwedata
  5. Dhata yekuchengetedza: Dhatabhesi inobatwa neOccentus Networks (EU)
  6. Kodzero: Panguva ipi neipi iwe unogona kudzora, kupora uye kudzima ruzivo rwako