Question

In: Computer Science

Example of non-regularity of c++ or phyton. You should provide an example to each one of...

Example of non-regularity of c++ or phyton. You should provide an example to each one of the following categories: Generality, Orthogonality, and Uniformity. That is, you will give total of three examples and explain why...

Solutions

Expert Solution

Example of non-regularity of c++ :--

  • Efficiency of targeted code is very important for any language design. the language should be in such a way that translator can generate executable code.
  • Example of non-regularity of c++ is :- static variables and Classes in c++.
  • When the classes of c++ is not used with the advanced object oriented features then it is not very different in memory consumption than a simple C struct.

Orthogonality --

  • This feature discourages the avodance of special features due to being context independent.
  • In c++ , all data types values returned from function excepting array types.
  • The c++ require the variable to be declared somewhere in the same block of code before they are used in.
  • for example --
  • int x = 9, y = 10;
  • Y++ ;
  • In above example would be overloading a comparision operator in c++ . it will not be able to identify weather the two elements are equal or not.

Generality --

  • The generality avoid special cases in use of construct.
  • The generality combines related construct into single general construct.
  • Example int z = 4; u = 9;
  • u ++ ;
  • The above example of orthogonality can overload the operators.

Uniformity --

  • Semicolon is necessary after a class definition.
  • Example -- class A ( );
  • int a();
  • the uniformity was forced to allow c++ to be compatible with C.
  • the other example of uniformity can be "operators &" (bitwise and) , "&& operator" (logical and). these both provide different results but looks very similar.

Related Solutions

Give one example to non-regularity on any programming language that you know. Your should provide an...
Give one example to non-regularity on any programming language that you know. Your should provide an example to each one of the following categories: Generality, Orthogonality, and Uniformity. That is, you will give total three examples and explain why...
I need 3 examples of Uniformity and Generality in C programing. Also one example of non-regularity.
I need 3 examples of Uniformity and Generality in C programing. Also one example of non-regularity.
How are current assets different from non-current assets? Can you provide an example of each? URGENT:...
How are current assets different from non-current assets? Can you provide an example of each? URGENT: NEED ANSWER ASAP PLEASE RESPOND WITH COPY AND PASTE, NOT ATTACHMENT USE ORIGINAL CONTENT NOT USED BEFORE ON CHEGG PLEASE ANSWER THROUGHLY TO ALL ANSWER TO BEST ABILITES ORIGINAL SOURCE NEVER USED BEFORE!!!
Explain the difference between volatile and non-volatile storage media. Provide an example of each.
Explain the difference between volatile and non-volatile storage media. Provide an example of each.
            c. Define each term and provide one (1) concrete example: a) Wild Type, b) Loss-of-function,...
            c. Define each term and provide one (1) concrete example: a) Wild Type, b) Loss-of-function, c) Selection of function and d) Gain-of-function.
Provide one example for each of the following concepts and explain how you can apply them...
Provide one example for each of the following concepts and explain how you can apply them in the real world now. 1) Simple kinematic equations 2)Principle of work and energy 3)Conservation of linear momentum
Provide one example for each of the four factors of production which you have personally provided.
Provide one example for each of the four factors of production which you have personally provided.
Provide one specific example of guidance that should be considered by a tax professional and enforced...
Provide one specific example of guidance that should be considered by a tax professional and enforced in a tax practice. Remember to consider the responsibility of the individual taxpayer as well. Describe one penalty, standard, or ethical concern that an individual taxpayer or a tax professional should be aware of that you did not know previously. Remember to provide an example.
What are the key differences between parametric and non-parametric tests? Provide one example of a parametric...
What are the key differences between parametric and non-parametric tests? Provide one example of a parametric test and one example of a non-parametric test.
Distinguish between a tax credit and a tax deduction provide one example of each
Distinguish between a tax credit and a tax deduction provide one example of each
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT