Question

Write an evaluation of at least two programming languages you know, using the criteria described below....

Write an evaluation of at least two programming languages you know, using the criteria described below.

Simplicity

Orthogonality

Data Types

Syntax Considerations

Simplicity and Orthogonality

Support for abstraction

Expressivity

Type checking

Exception Handling

Aliasing

Readability and writability

Homework Answers

Answer #1

Below is the table comparing 2 languages based on the given criteria:

Criteria

C

C++

Simplicity

C is a middle level language.

C++ is a high level language. C++ is a very complex language that for a programmer to learn completely can take well over a year, but a programmer can learn enough to make powerful programs in a relatively short time.

Orthogonality

The extent to which different language features can be composed in a free and uniform manner, with predictable effects and without limitations.Supports orthogonality.

Supports orthogonality.

Data Types

There are five data types for C: void, int, float, double, and char.

C++ defines two more:  void, int, float, double, and char, bool and wchar_t

Syntax Considerations

equally readable, since syntaxes are very similar (like 80%-85% of similitud).

equally readable, since syntaxes are very similar (like 80%-85% of similitud).

Support for abstraction

A common method used in the Linux kernel and other large C code bases, which lack a built-in concept of object-orientation, is function pointers. C’s structs do not offer as much abstraction

In C++ language data abstraction can be achieve by using class.

Expressivity

Both languages are expressive such as through short cut operators and the flexible for loop.

Both languages are expressive such as through short cut operators and the flexible for loop.

Type checking

C has mechanisms to avoid type checking, such as by passing optional parameters to a function.

We say C++ is a strongly typed language. C++ supports strong type checking.

Exception Handling

C does not provide direct support for error handling (also called exception handling)

C++ provides support for exception handling. Exceptions are used for "hard" errors that make the code incorrect.

Aliasing

Aliasing is predominant in C because of C’s reliance on pass by copy (value) for parameter passing, requiring pointers to be used in many cases.

Also supports Aliasing.

Readability and writability

too expressive to promote readability. There are two areas where C is superior for writability, the ability to manipulate bits and the ability to perform pointer arithmetic.

It does however have very good control structures and data type structures which can help the readability. But in general it can be difficult to read. C++ allows for high levels of data abstraction, and expressivity’s in the language allowing the programmer to create a myriad of structures to solve different programming problems making it very difficult writable.

Thank you.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions