• xylogx@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 days ago

    Just to add to this all data is ultimately stored as ones and zeros. In order to translate it to a piece of text or some type of number the computer needs to determine what type of data it represents. If the computer guesses the wrong type you just get garbage. Languages like C allow you to store data without rigid type definitions, it is up to the programmer to make sure the code gets the type right. In a strongly typed language you are not allowed to use variables of one type as some other type without some explicit conversion. It is safer but a little annoying.