1. Classifications of Type SystemsWhat is the difference between the type system in Java and in Python ? Tamer Mohammed Abdul-Radi Backend Software Engineer at Cloud9ers tamerradi tamer_radi 2. Classifications of type systemsWe can classify any type system by answeringtwo questions1. How strictly types are distinguished?2. When type information is acquired? 3. How strictly types are distinguished?Answer is one of two● Weakly typed language● Strongly typed language 4. Weakly typed languages● A language in which types may be ignored.● In JavaScript: "12" - 2 == 10 (without doing any explicit conversion)● Javascript is weakly typed 5. Strongly typed languages● A language in which types are always enforced.● If you have an integer, you cant treat it like a string without explicitly converting it.● Java and Python are strongly typed. 6. Classifications of type systemsWe can classify any type system by answeringtwo questions1. How strictly types are distinguished?2. When type information is acquired? 7. When type information is acquired?Answer is one of two1. Statically typed language2. Dynamically typed language 8. Statically Typed Language● A language in which types are fixed at compile time.● Values have types, and variables too! (must match the type of values that holds)● Java and C are statically typed languages. 9. Dynamically types langauges● A language in which types are discovered at execution time.● Values have types, but variables do not!● JavaScript and Python are dynamically typed, because they figure out what type a variable is when you first assign it a value. 10. Conclusion● Java is "Strongly typed" and "Statically typed" ○ You cant subtract "12" from 2 ○ Variables have types, you have to define them in compile time. 11. Conclusion● JS is "Weakly typed" and "Dynamically typed" ○ You can subtract "12" from 2 ○ Variables doesnt have types 12. Conclusion● Python is "Strongly typed" and "Dynamically typed" ○ You cant subtract "12" from 2 ○ Variables doesnt have types (or weakly typed, and can be changed later) ○ Python uses Duck typing, which is an extreme style of dynamic typing ○ We will talk about Duck typing later