Question

In: Computer Science

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...

Solutions

Expert Solution

Regularity

It refers to how well the features of a programming language are integrated. Good regularity means having no or very less restrictions in doing some constructs. Basically regularity is divided into 3 more sub groups

  • Generality
  • Uniformity
  • Orthogonality

Generality

if language avoid special cases during the usage of constructs or it combines two or more constructs into one simple construct then language is said to achieve generality.

Example:

In java programming language we use inheritance but we cannot use multiple inheritance (special case). Therefore it proves non generality hence non regularity

Uniformity

Language achieve uniformity when similar things look similar and works similar, but a language is not uniform, if dissimilar things work similar

Example

In java we can increment a variable by many dissimilar ways, like i++, ++i, i=i+1, i+=1

Orthogonality

Language is said to be orthogonal if its constructs behaves the same, in every context.

Example

in java programming language int, byte, short, long, enum etc can be used in a switch statement, but strings cant be used here. hence it proves non-orthogonality hence non-regularity.


Related Solutions

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...
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.
Write a function in any functional programming language that will reverse a general list. For example,...
Write a function in any functional programming language that will reverse a general list. For example, if an input is (A (B C (D E)) F), output is (F ((E D) C B) A).  Please note that any built-in/pre-defined function, e.g., reverse, cannot be used in your answer. Please DO NOT hard-code any input values, output values in your code. Please submit a screenshot of where your code got compiled, executed, showing the execution result
Can you please solve this using recursion/ dynamic programming? Any programming language is fine. Wallace the...
Can you please solve this using recursion/ dynamic programming? Any programming language is fine. Wallace the Weightlifting Walrus is training for a contest where it will have to lift 1000 kg. Wallace has some weight plates lying around, possibly of different weights, and its goal is to add some of the plates to a bar so that it can train with a weight as close as possible to 1000 kg. In case there exist two such numbers which are equally...
Give any simple and very easy example for: Programming and coding standards & Developing and implementing...
Give any simple and very easy example for: Programming and coding standards & Developing and implementing test plans
Give one best example of non tariff trade barrier
Give one best example of non tariff trade barrier
Give an example of a modern day tragedy of the commons.  Should there be any government...
Give an example of a modern day tragedy of the commons.  Should there be any government intervention in the use of common resources and what would the consequences be if there were no government intervention in these circumstances?  If government should intervene, how would you recommend that they solve the problem? Please yse at least 400 words.
One of the problems with non-verbal language is that it is difficult to interpret. You are...
One of the problems with non-verbal language is that it is difficult to interpret. You are giving a presentation to your associates at work (or classmates in class) and you observe the following non-verbal behavior in your audience members. One associate/student is writing the entire time you are talking. One associate/student is smiling although you are talking about a serious issue. One associate/student has his/her eyes closed. Discuss three possible interpretations of each non-verbal behavior and analyze how each interpretation...
1. Based on a company you know, provide ONE real life example of related pieces of...
1. Based on a company you know, provide ONE real life example of related pieces of data, information and knowledge, and discuss how one is incorporated into the next. Briefly explain your answer.
Discuss any API / libraries of your favorite programming language (e.g. python, c#, java etc.) that...
Discuss any API / libraries of your favorite programming language (e.g. python, c#, java etc.) that you have used/reused in any of your previous projects and how it contributes to the overall project.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT