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
Programming language: Java If any more information is needed please let me know exactly what you...
Programming language: Java If any more information is needed please let me know exactly what you need. Though there are a bunch of files they are small and already done. Modify the driver file ,Starbuzz coffee, to be able to order each blend and be able to add each condiment to each of the blends. The price should be set accordingly. Be able to: order 1 of each type of beverage, add multiple toppings to each ordered beverage and use...
Give an example of a non-regular Context-Free Language that can be recognize by a Deterministic Pushdown...
Give an example of a non-regular Context-Free Language that can be recognize by a Deterministic Pushdown automata and one that cannot.
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 one best example of non tariff trade barrier
Give one best example of non tariff trade barrier
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 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.
give an example of an application that should not be implemented using n-version Programming. Explain why?
give an example of an application that should not be implemented using n-version Programming. Explain why?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT