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


Figure 1.  List versus vector timings



Download 1,78 Mb.
Pdf ko'rish
bet14/32
Sana13.01.2022
Hajmi1,78 Mb.
#355100
1   ...   10   11   12   13   14   15   16   17   ...   32
Bog'liq
Software-for-infrastructure

Figure 1. 

List versus vector timings.


COVER FE ATURE

compUteR

 

52

information is encoded in the type system.

Consider

void increase_to(double speed);  

// speed in m/s

This is an error waiting to happen. Maybe we understand 

the requirements for an argument, but they only appear in 

comments and other documentation. Is 



increase_to(7.2)

 

correct? Does 



7.2

 represent a speed? If so, in what units? 

A better try would be

void increase_to(Speed s);

Given a reasonable definition of 



Speed



increase_to(7.2)

 

is an error and 



increase_to(72m/10s)

 is likely to be cor-

rect. This isn’t just an issue of units; I have a philosophical 

problem with parameters of near-universal types. For 

example, an integer can represent just about everything. 

Consider


// construct a rectangle:


Download 1,78 Mb.

Do'stlaringiz bilan baham:
1   ...   10   11   12   13   14   15   16   17   ...   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