Студопедия Главная Случайная страница Обратная связь

Разделы: Автомобили Астрономия Биология География Дом и сад Другие языки Другое Информатика История Культура Литература Логика Математика Медицина Металлургия Механика Образование Охрана труда Педагогика Политика Право Психология Религия Риторика Социология Спорт Строительство Технология Туризм Физика Философия Финансы Химия Черчение Экология Экономика Электроника

Find the answers to these questions in the text below.





 

1) Since when has C++ become the most popular commercial programming language?

2) What was it designed for? What rules were used to create it?

C++ PROGRAMMING LANGUAGE

C++ (pronounced "see plus plus", IPA: /si plʌs plʌs/) is a general-purpose computer programming language. It is a statically typed free-form multi-paradigm language supporting procedural programming, data abstraction, object-oriented programming, and generic programming. Since the 1990s, C++ has been one of the most popular commercial programming languages.

In The Design and Evolution of C++, Bjarne Stroustrup describes some rules that he uses for the design of C++. Knowing the rules helps to understand why C++ is the way it is. The following is a summary of the rules.

C++ is designed to be a statically typed, general-purpose language that is as efficient and portable as C

C++ is designed to directly and comprehensively support multiple programming styles (procedural programming, data abstraction, object-oriented programming, and generic programming)

C++ is designed to give the programmer choice, even if this makes it possible for the programmer to choose incorrectly

C++ is designed to be as compatible with C as possible, therefore providing a smooth transition from C

C++ avoids features that are platform specific or not general purpose

C++ does not incur overhead for features that are not used

C++ is designed to function without a sophisticated programming environment

 

12. Study the text below and complete the table

 

THE DIFFERENCES BETWEEN C & C ++

  C C ++
     
     
3, 4..    

The C++ programming language was originally derived from C. However, not every C program is a valid C++ program. As C and C++ have evolved independently, there has been an increase in the number of incompatibilities between the two languages. The latest revision of C, created a number of additional conflicting features. The differences make it hard to write programs and libraries that are compiled and function correctly as either C or C++ code, and confuse those who program in both languages. The disparity also makes it hard for either language to adopt features from the other one.

Bjarne Stroustrup, the creator of C++, has repeatedly suggested that the incompatibilities between C and C++ should be reduced as much as possible in order to maximize inter-operability between the two languages. Others have argued that since C and C++ are two different languages, compatibility between them is useful but not vital; according to this camp, efforts to reduce incompatibility should not hinder attempts to improve each language in isolation.

Today, the primary differences (as opposed to the additions of C++, such as classes, templates, namespaces, overloading) between the two languages are:

inline — inline functions are in the global scope in C++, and in the file (so-called "static") scope in C. In simple terms, this means that in C++, any definition of any inline function (but irrespective of C++ function overloading) must conform to C++'s "One Definition Rule" or ODR, requiring that either there be a single definition of any inline function or that all definitions be semantically equivalent; but that in C, the same inline function could be defined differently in different translation units (translation unit typically refers to a file). (Note that Microsoft C++ compilers define inline functions as C99 ones)

The bool type in C99 is in its own header, <stdbool.h>;. Previous C standards did not define a boolean type, and various (incompatible) methods were used to simulate a boolean type.

Single character constants (enclosed in single quotes) have the size of an int in C and a char in C++. So in C sizeof 'a' == sizeof(int) whereas in C++ sizeof 'a' == sizeof(char). Nevertheless, even in C they will never exceed the values that a char can store, so (char)'a' is a safe conversion that will only change the type of the expression (here it is changed from int to char), but not its value (which on systems using ASCII-encoded characters is 97).

Additional keywords were introduced in C++, and thus they cannot be used as identifiers as they could in C. (for example, try, catch, template, new, delete,...)

In C++, the compiler automatically creates a "tag" for every struct, union or enum, so struct S {}; in C++ is equivalent to typedef struct S {} S; in C.

C99 adopted some features that first appeared in C++. Among them are:

Mandatory prototype declarations for functions

The inline keyword

The removal of the "implicit int" return value

13. Read the texts to find out the answers to these questions

 

1) What derivative is Java of?

2) What was Java targeted first? Why was it retargeted for the Web?

3) What primary goals were there in creation of Java language?

4) Is Java still as popular as it was before? Where is it mostly used nowadays?

 







Дата добавления: 2015-10-15; просмотров: 829. Нарушение авторских прав; Мы поможем в написании вашей работы!




Важнейшие способы обработки и анализа рядов динамики Не во всех случаях эмпирические данные рядов динамики позволяют определить тенденцию изменения явления во времени...


ТЕОРЕТИЧЕСКАЯ МЕХАНИКА Статика является частью теоретической механики, изучающей условия, при ко­торых тело находится под действием заданной системы сил...


Теория усилителей. Схема Основная масса современных аналоговых и аналого-цифровых электронных устройств выполняется на специализированных микросхемах...


Логические цифровые микросхемы Более сложные элементы цифровой схемотехники (триггеры, мультиплексоры, декодеры и т.д.) не имеют...

Словарная работа в детском саду Словарная работа в детском саду — это планомерное расширение активного словаря детей за счет незнакомых или трудных слов, которое идет одновременно с ознакомлением с окружающей действительностью, воспитанием правильного отношения к окружающему...

Правила наложения мягкой бинтовой повязки 1. Во время наложения повязки больному (раненому) следует придать удобное положение: он должен удобно сидеть или лежать...

ТЕХНИКА ПОСЕВА, МЕТОДЫ ВЫДЕЛЕНИЯ ЧИСТЫХ КУЛЬТУР И КУЛЬТУРАЛЬНЫЕ СВОЙСТВА МИКРООРГАНИЗМОВ. ОПРЕДЕЛЕНИЕ КОЛИЧЕСТВА БАКТЕРИЙ Цель занятия. Освоить технику посева микроорганизмов на плотные и жидкие питательные среды и методы выделения чис­тых бактериальных культур. Ознакомить студентов с основными культуральными характеристиками микроорганизмов и методами определения...

Оценка качества Анализ документации. Имеющийся рецепт, паспорт письменного контроля и номер лекарственной формы соответствуют друг другу. Ингредиенты совместимы, расчеты сделаны верно, паспорт письменного контроля выписан верно. Правильность упаковки и оформления....

БИОХИМИЯ ТКАНЕЙ ЗУБА В составе зуба выделяют минерализованные и неминерализованные ткани...

Типология суицида. Феномен суицида (самоубийство или попытка самоубийства) чаще всего связывается с представлением о психологическом кризисе личности...

Studopedia.info - Студопедия - 2014-2025 год . (0.013 сек.) русская версия | украинская версия