Why is Data.Word in Haskell called that? -


why unsigned integral type in haskell called "word"? "ord" stand "ordinal"?

here documentation on data.word: http://hackage.haskell.org/package/base-4.6.0.1/docs/data-word.html#t:word

this hard question google!

from wikipedia:

the term 'word' used small group of bits handled simultaneously processors of particular architecture. size of word cpu-specific. many different word sizes have been used, including 6-, 8-, 12-, 16-, 18-, 24-, 32-, 36-, 39-, 48-, 60-, , 64-bit. since architectural, size of word set first cpu in family, rather characteristics of later compatible cpu. meanings of terms derived word, such longword, doubleword, quadword, , halfword, vary cpu , os.

in short, word fixed-length group of bits cpu can process. work words powers of two, since modern cpus handle well. word in particular not number, although treat such purposes. instead, think of fixed number of bits in ram can manipulate. common use word8 implement ascii c-style strings, example. haskell's implementation treats wordn types unsigned integers implement num, among other type classes.


there module called data.ord "ord" stands "ordering". has functions working comparisons of datatypes , ordering datatype , ord typeclass defined. unrelated data.word.


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -