Table of Contents
- 1 What are some of the advantages of using a strong statically typed language vs a non type safe language?
- 2 What does it mean for a programming language to be strongly typed what advantages & disadvantages would arise from this?
- 3 What is the opposite of strongly typed in C programming?
- 4 What are some examples of weakly typed languages?
What are some of the advantages of using a strong statically typed language vs a non type safe language?
Benefits of Statically Typed Languages
- Protection from Runtime Errors. This is the main benefit of statically typed languages.
- IDE Assistance.
- Performance Optimisation.
- Expressive Language Features.
- Less Boilerplate Code.
- Fast Development Cycles.
- Fast Start-up Times.
- Generic Programming and Simpler Errors.
What does it mean for a programming language to be strongly typed what advantages & disadvantages would arise from this?
Certain operations may be allowable only with certain data types. The language compiler enforces the data typing and use compliance. An advantage of strong data typing is that it imposes a rigorous set of rules on a programmer and thus guarantees a certain consistency of results.
What are the benefits of dynamically-typed languages?
Benefits Of Dynamic Typing
- Simpler languages.
- Smaller source code size because fewer and/or shorter declarations.
- Quicker to read because less type clutter to distract and stretch one’s view.
- Easier to implement limping if needed by the domain (see LimpVersusDie).
- Lack of compile time, meaning quicker turnaround.
Can you use one type as another in strongly typed languages?
A strongly typed language does not allow you to use one type as another. C is a weakly typed language and is a good example of what strongly typed languages don’t allow. In C you can pass a data element of the wrong type and it will not complain. In strongly typed languages you cannot.
What is the opposite of strongly typed in C programming?
The opposite of “strongly typed” is “weakly typed”, which means you can work around the type system. C is notoriously weakly typed because any pointer type is convertible to any other pointer type simply by casting.
What are some examples of weakly typed languages?
Java is a very bad example of weakly typed (and any language that has good reflection will most likely not be weakly typed). Because the runtime of the language always knows what the type is (the exception might be native types). This is unlike C. C is the one of the best examples of weakly typed.
What is the difference between strongly typed and weakly typed?
Strongly typed means, a will not be automatically converted from one type to another. Weakly typed is the opposite: Perl can use a string like “123” in a numeric context, by automatically converting it into the int 123. A strongly typed language like python will not do this.