Several scripting languages are typeless Explain the obvious

Several scripting languages are typeless. Explain the obvious advantages and disadvantages of having no types in a language.

Solution

Advantages: Having no types allows for more flexibility.
The only advantage is that is allows coders to write sloppy programs quickly.

Disadvantages:
1 You are not in control of the data and variables, the compiler or interpreter is.
2 If you mis-assign variables, there is no way for the compiler to catch any of your mistakes. It just \"does what you said\", even if it is wrong.
3 Supporting programs in a type-less language is much more difficult that in a strongly types one. It is often very difficult to determine what the original programmer wanted to do.

In other words:
A typeless language is easier to program with, as the programmer does not need to figure out nor keep track of the type of each variable. The downside to this is that it is easier to make mistakes and to confuse variables. Think for instance of the confusion that can arise between a variable containing a value and variable containing a pointer to that value. Without types, it is harder to make this distinction clear. Other advantages of typeless languages are that they are easier to learn, as there are less rules specifically regarding types. Also, it is easier to make changes in the program, i.e. changing a variable type. In a typed language, such as C, each type takes a certain storage length in memory: thus a structure will take a precise memory amount depending on each type inside it. Therefore it is not possible to change the type of a member, after declaring its structure. Typeless languages instead allow this flexibility.

Several scripting languages are typeless. Explain the obvious advantages and disadvantages of having no types in a language.SolutionAdvantages: Having no types

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site