Whar is type safe language? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Whar is type safe language?

why swift is given that any other type safe language is there

22nd May 2017, 5:26 AM
Shubham
Shubham - avatar
2 Answers
+ 11
Quoting from Quora: "Type safe" usually refers to languages that ensure that an operation is working on the * right kind of data at some point before the operation is actually performed. This may be at compile time or at run time. * right kind of data - This means that the language requires the compiler/interpreter to check if we are dealing with correct datatypes or not, or if the said data can be interpreted as a different type. There are pros and cons. Further reading: https://www.quora.com/What-does-it-mean-if-a-language-is-type-safe
22nd May 2017, 6:00 AM
Hatsy Rei
Hatsy Rei - avatar
0
type weak language example: js...You simply declare a var x and let the browser do the work of confirming what kind of data the var x holds.(bool,integer,float,double etc) type safe language example: java...Try declaring something as simply var x (instead of say int x) and watch a tide of errors come up if you compile. 😂
20th Aug 2017, 5:40 AM
Haris
Haris - avatar