Cover fe ature 47 january 2012 Published by the ieee computer Society 0018-9162/12/$31. 00 2012 ieee



Download 1,78 Mb.
Pdf ko'rish
bet22/32
Sana13.01.2022
Hajmi1,78 Mb.
#355100
1   ...   18   19   20   21   22   23   24   25   ...   32
Bog'liq
Software-for-infrastructure

if 

(x.c) f1(x) else f2(x)

.

Using an if-statement is the least structured and most 



flexible option. However, we should choose the more struc-

tured and easier-to-optimize alternatives whenever possible. 

The hierarchy option can be most useful, but was seriously 

overused in the past couple of decades. Not every class natu-

rally belongs in a hierarchy, not every class benefits from the 

coupling that a hierarchy introduces, and not every class is 

improved by the possibility of adding to it through deriva-

tion (subclassing). Of the alternatives, a call of an ordinary 

function is the easiest to understand—it’s also often easy 

to inline. Consequently, overloading—statically selecting a 

function based on argument types—can lead to major ef-

ficiency advantages compared to indirect calls (as used to 

select among alternatives in a class hierarchy).

To become significantly more reliable, code must 

become more transparent. In particular, nested conditions 


Download 1,78 Mb.

Do'stlaringiz bilan baham:
1   ...   18   19   20   21   22   23   24   25   ...   32




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©www.hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish