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


find_if()  didn’t say that its  first argument had to be a  Container



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


particular, the definition of 

find_if()

 didn’t say that its 

first argument had to be a 

Container

. Errors that man-

ifest as exceptions in a dynamically checked language 

become compile-time errors. Unfortunately, the reporting 

of those errors can be very obscure. Consequently, much 

effort in modern C++ is aimed at better specification of 

template arguments.

12,13


 We also need to add semantic 

constraints

14

—for example, a generic function that uses a 



copy operation needs to know whether that copy is deep 

or shallow. Similarly, a generic function that uses a 



+

 needs 


to know whether that 

+

 is an arithmetic function or some-

thing else, such as a concatenation.

An explicit representation of system structure can 

simultaneously increase flexibility, improve error diag-

nostics, and improve efficiency. Correctness and efficiency 

are closely related properties of a well-specified system. 

It seems that extensive use of a rich type system leads to 

shorter code independently of whether the type system 

is static or dynamic. Obviously, we can also use types 

to gain the usual aspects of an object-oriented system— 

encapsulation, runtime polymorphism, and inheritance—

but we can’t go overboard and try to rely completely on 

static structure. That isn’t necessary for noncritical parts of 

a system, and a complete absence of runtime checks would 

leave the system open to catastrophic errors caused by mal-

functioning hardware. Dealing gracefully with hardware 

failure is a crucial characteristic of infrastructure systems.




Download 1,78 Mb.

Do'stlaringiz bilan baham:
1   ...   16   17   18   19   20   21   22   23   ...   32




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©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