The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]



"Создатель C++ раскритиковал навязывание безопасных языков программирования"
Версия для распечатки Пред. тема | След. тема
Форум Разговоры, обсуждение новостей
Исходное сообщение [ Отслеживать ]
Отдельный RSS теперь доступен для каждого обсуждения в форуме и каждого минипортала.
. "Создатель C++ раскритиковал навязывание безопасных языков пр..." +1 +/
Сообщение от Anonymous Cowardus (?), 22-Янв-23, 19:19 
Ten "safe C" commandments to remember...

1. Restrict to simple control flow constructs. Do not use goto statements, setjmp, longjmp, or recursion.
2. Give all loops a fixed upper-bound.
3. Do not use dynamic memory allocation after initialization.
4. Limit functions to no more than 60 lines of text.
5. Use minimally 2 assertions for every function of more than 10 lines.
6. Declare data objects at the smallest possible level of scope.
7. Check the return value of all non-void functions, and check the validity of all function parameters.
8. Limit the use of the preprocessor to file inclusion and simple macros.
9. Limit the use of pointers. Use no more than 1 level of dereferencing per expression.
10. Compile with all warnings enabled, in pedantic mode, and use one or more modern static source code analyzers.

Ответить | Правка | Наверх | Cообщить модератору

Оглавление
Создатель C++ раскритиковал навязывание безопасных языков программирования, opennews, 22-Янв-23, 11:37  [смотреть все]
Форумы | Темы | Пред. тема | След. тема



Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру