A language that enforces type safety at compile time is called a statically typed language.
For example trying something like this will throw an error at compile time
Compile time error: Cannot implicitly convert type 'double' to 'int'. An explicit conversion exists (are you missing a cast?)
For example trying something like this will throw an error at compile time
int i = 5.25;
Compile time error: Cannot implicitly convert type 'double' to 'int'. An explicit conversion exists (are you missing a cast?)
No comments:
Post a Comment
Comments will appear once they have been approved by the moderator