Политкорректное программирование

User avatar
awaken
Уже с Приветом
Posts: 3211
Joined: 20 Mar 2002 10:01
Location: Chelyabinsk->Rain City,WA->Moscow

Политкорректное программирование

Post by awaken »

==========================================================================
* Newsgroup: comp.lang.c++.moderated
* From: "Andrei Alexandrescu" <SeeWebsiteForEmail@moderncppdesign.com>
* Date: 2 Sep 2003 02:06:10 -0400
* Subj: banning non-neutral language in C++ source code
==========================================================================

GUIDELINE
=========
The use of any language that is not neutral to a collection of
politically-sensitive issues (including, but not limited to: gender, sex,
age, political preference, occupation, food, color (and that includes any
reference to color, such as "font color" etc.), the military, etc.) in
source code is forbidden.

REASON
======
The non-politically-correct language used by some (especially white males)
in source code can cause offense and is unprofessional. This applies to all
code, including the filenames themselves as well as comments and
identifiers.

Bad language, often caused by white males, has been an issue starting with
the earliest UNIX systems. Gender-biased commands such as (I apologize for
needing to write such abominations, but they must be here for conformity):
"man" (suggested replacement: "person"), "mail" (suggested replacement:
"gendre"), "history" (suggested replacement: "herstory") and the most
offensive "touch" (suggested to be removed from any distribution) are as
old as UNIX programming.

In C++ in particular, bad language takes abominable forms. Any STL
documentation shamelessly mentions that sets and maps are implemented as
(excuse me) red-black trees (a data structure created by a guilty white
male). There has been an oppresive, incorrectly favored "main" program ever
since the beginning of C, which was conspicuously kept in C++ and even in
newer languages. There is a qualifier called "short" (suggested
replacement: size_doesnt_matter). The keyword "long" is suggested to be
removed. Applying the "sizeof" operator is considered offensive to the
expressions or types the operator is applied to. All uses of "explicit" in
source code are strictly forbidden. Do not abuse "volatile". It is also
suggested that the underused and ostracized "union" keyword is used more
often, at least once per source file.

Big corporations have their share of guilt, too. Microsoft has defined
"__fastcall" (offensive to other calling conventions, implying they are
slow) and "naked" (and usage is prohibited).

It is recommended to use "not true" instead of "false" throughout. If the
recommended definition "#define perhaps" is made, then the best form is
"perhaps not true".

DISCUSSION
==========
The only exception I can think of is for s/w that is designed to recognise
parse C and C++ code to find illegal words such as the above. Whenever such
a word must be mentioned, a comment "// Apologies to the reader" must be
mentioned, followed by an empty page so that the reviewer can continue
reading only if they agree.

(c)Andrei

Return to “Вопросы и новости IT”