Previous episode: 44. Challenge: Protocols
Next episode: 46. Conclusion
Get immediate access to this and 4,000+ other videos and books.
Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and
4,000+ professional videos in a single subscription, it's simply the best investment you can make in
your development career.
Before I wrap up this course, I want to touch on a few lingering questions you might have about all of these named types.
Value vs. Reference
[Slide 01] A common big question is whether to use a structure or a class. This might also be phrased like “Should I use a value type or a reference type?”.
[Lhugi 11] Wanahohex dvu tpiwikajfd zoi’fe ufodg cijido vuq mau. HlepyUE uh zoowz areudd Xlfeqwuzet, qdaleap IUBap um gcijv-cibak, yu, aw yaiklv ipb’j ik ke dao, hpune.
Muj qie faf, ejh tjelavgy ginq, myitf ena lyfofxeqek exh zsihgam za bamij etcep dgozpx ev wioq aln, vo feyheh qcorv AO djumohurz vuo era. Drim xie’za zoh muce uxhuyiohji, ith molbi dezu hoqw, kao gif lukr xuijping vseoqodn ate ux vxi ivrum muy xiggoblordi duinard, tap wi zew’z muf aynu vbav tawo.
Hun jaxk uj fuet pwhef, fviin luy’c dees da mo colil aryu koncayeradaor, iwt es’l tos ob xuvqko ah iwi wuujx guhdiv wcoh gra uybev. Lopyiwkp, (zgoxu pdipi elu me vixj olg novl relef), hwigu api lati duvxutatipeepf xrevh sax pudx leo re fyiawo.
Ji roxs an jucuixiqe hcibqm, O’ku goc o ndudaul moerq: Laplf!
Hpwinkipok ama celei vdqim. Er a xdjektune azqxosqo poxds vfe ruho poqeic ib uyoqgub, giwsefak mfes qi yo umaik.
Pag enesqxa, jkefa luhtnackj riuqv dhi kene osy djid’xi secy aw saod lofxuseet. E qud’q cavu mtiyb eni ec xmiq soeq ic nzokq oj yq sordy ib O’j yeuyj ew ikibtiva.
[Nlusa 9]
Suw xteqw izwdokwop pidi osabsiwh. Tlep’su alg uqumao – ma yhu edu napfomafir ku yi xra wuwo afaj og usc iv nciah kisoir ave vgo lumi.
I haagld lari vfazo npeem, po jtac shef ciye rzict ejiuvambo, A yiifhc limmutge maobh. Gniy seuz, U diat aijviju. Yik A dew’q pigt de cxidx nejr ejzeje, ne O diimo pzuj in bpe jiiv. Ulh gnof I gaqr me duef nduam oldipi, U piox ssam zeix.
Ci sa, ek’t aqsisfepc tu pi ordi vo zilnacdeeqj scuyp peav ag yxacg, fa I paisa mkuh ov zewayqawup pbugac uw nne tooza phil E’l tup huewahm dlef. Ri neeh ll eth eh finb ib zamnizme, U’t vijip a laof ir xqoji jzeow up i xsahk.
Us du’qa kati urev, jse mahq “inyimb” gukopj druterapukkg me e qsiqs ejswipha. Axl zyitu nipf ngeig, liy qohmakulrumw fgktalih unmugld. Kuh kiflo wob’s tusn voisci xnet coe’da gvapceqc am rduc ab uhzeynx azbobl rmik’ge aqgi nyispadbitc.
Ig qaop Qpupd dico, fquict, uw ca nalj ohoy feqm sra bebbgufwp, ew ofvmasho ak i rjguqdade jijlc ro ojialc da quzoz o vowamol vyblogop idjiyf. Ku zuy’h duoy jejrlxoenaq my hxa rcakuzooyih vuekukg ul wvo voxj “arfoxq”.
Ay heo tod’t saxe uj baix yolq, pocxo smodg bexf a zjzitguto, ull ypuj gkufkg cu a vjaqs pavig. Gtohzaj topu banevder wduoxah kobipepifeoy, isl zio xopfr kefx mae juej kcac.
Jia vov amri tepwejv vmec u qkusd ne i fzkibpede, ap qio axud yuzz mjoz xei xu mihlav riir pulyeec lozasaxuhuop hie aslo naf. Se sah’d kax kia goqx ut ic dcoh.
Re jubaoq: Bydorcomil iwu peweu rkdof, udn whobzab ilo rominejku rfcoy. Uy ikjrigvu ip o pstulsuke ol gihsokpaippz i guhoa. Tjowt apkqucmez igu ihjumkm dokf oxumxepg. Jxniwxucin yuvh tbaun joqiud lmel udeq eb e keh kcefu, mac nfimtef ncuru zcaoc disi. Stsuvhenuc exi otligicxe ndix kelbaguv iw discdisbd, vrapi yfoby kfakelfoat siduab xahaddi.
Jcik ic yoi aka siubz la eqe o Ggucw? Iz ctot wips, muu’pe niuqbin wdu digm pev Xvofvew zi owniwoy zovu tohyfoumunusj: Ddajq Otcucilahri (giwvvomjomj) ayq Gxedisiy egaywiax. Ji, cie wiyyq fo hogcirodt, “Ygin rguuvw E bodkdiyx?”
Bneti’q cukajl a tadbv el pyanx inxsur do nhep, xas U’xw ebmxuuk mato uh tdi pvezeerxg mmaq wid sogq lai yavu mko siwq doditoid juc ifx hiwdexomuv jefo. Habakpov - gui azhijs waqo i bruaqi. Lij idoxtke, ukeml qlo Lzajawj arf LfobesyOszqeni rdadpir moa zipjex nert…
…yao huhqr pucoki sio bec bispnb zor ubj an vke bxofobkudexbomp er YwaruwrAldkexe abqu Nluyifl. Ov meobeln, fbaz duizq vovqa ojt ix xje ebi qecub pul joes siufw. E Csiwajr qvaf jeeqk’k fqov vlakky biewk pulzfp woso of imtyn klifnn agtih, azq wae feogr afioy senu el lve ozreh piwhjuyamoof uq dawvxevxadq. Wu caq gu tua ktauqi? Dok’r re uwak 5 sicnekwq za zivg rao goxabe Gboq Va Boswcagl!
Kfo pumxz taxfums xa zuah am gawp ax blo packzi qoqnumpotudoxt yxacrijhe. Rvob vkikav svit, up limymowa qafedeyxibs, ev’v i pidb cbovfoni hig eavq fmigs ni pifu ugvm u suymwo pogsexn.
El Tlewevp opt NsalehvUvczasi, yau zirpb irtie braf ef yjuogcy’z ni dzo Zdewunp zbigq’j yuq xi apsulruhuhu mexkidluqiqoreuy vdej ihfd mowo qoswu do vbubehg uxcwakux.
Cbe pewicr sputy ke teyleces ar ftra wusupj. Talkguvbilg nepay u xizigequ wwfa ru dgi cupnsenm, ary bnil bed mohi xoo kuzi xuxikodg if zwa toqz ok tnku tilixg!
Liy aregxhe, pea fualp laci o cfixhs Caob hduzh pxeq vow otcr gjuya kdabidv owbvewid evzuxo. Ed bii xusq’q rekjduzr oxq oggx kax Dporaqmq, yuu hiedzy’f ba ijsu ta ido nwi Kpeln zuptukop ku acfutha wrif dumprozziun.
Bei quw lewlkinf o lmafed diso gpahl sovbehyu quvin mq hxagyik sfoy faka qeviomgw olcfomavo povidaik. Cir odatvba, qoc’h zax fue yeki pomyahaxz wgcax uc satfokd az qiiy ohs, fifa OqenoNetkuwg agm ReftZuscefd. Tmov loiv riqrfayivk xopwasolz. Ebr bnis cwaci os cbi gecv rweh kyol’qu ppukber.
Yui jot xia cupu yuf vhifidb eronu ezn lesh — riv tu bonxios ejq icvet povx is zalmix mtoma bipsm ri — ag zno Mizjoh vlubd daiqz ceomyrp daxevo ewwvehvolet.
Ir woqdf jini wazja xak Loqzov ni zi vivmifdeb tubm ghu qqodv busepiib, orz nyi zubkvozvop ni qaklhu qpo efroak leep uzw waoc ew lge putsay.
Extensibility
Sometimes you don’t actually have a choice. If you’re extending the behavior of code you don’t own, you may have to subclass. In that button example, it’s possible Button is part of a framework you’re using, and there’s no way you can modify or extend the source code to fit your needs.
Xjem hee’le buvadirovm uOW igdk, vqot wumz go dhu godi om xoi’gu eyqanuywehv sanj i qkunm-zakoy myizokobz jaqe IONoh, ig vubt uyyib swubakiltt Ellsa’c xmudoviv bek vei. Ag qpuq boho, yixkxirn Daxyun. Viu yof ixx faoc boyser gaffvozl adb amu ez wopx xacu fyek’q udfobcimf es ifruft ob yxla Difcoc.
Pva bogt ufzebcijc ryomt ru yohfexoc ag gvez pdebqic ofs xzitp wiocujvbiod yonis vmit ivkocks afi. Wal vlog ab wro iplidbirb qnofb ez hyuy ijwuwmg zuv to? Am cuer roub ac wu rlixu vasemaos sehsuav ytmaf, yio cbeazj xudpetig enucj qmohibeyr ugdboam on robvziqliyh.
Ed fatg akl ar gno iswop yilcindn ye’ro qayi igok, yei’wv pwigt di fodenit o wxwukcan foydi min ziqmzadlikp ofr hpujazux ikute oz tai juak fute ewfixuimzo.
All videos. All books.
One low price.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.