| 1 | [[PageOutline]] |
| 2 | |
| 3 | = Boost Library Requirements and Guidelines = #intro |
| 4 | |
| 5 | == Introduction == #Introduction |
| 6 | |
| 7 | This page describes requirements and guidelines for the |
| 8 | content of a library submitted to Boost. |
| 9 | |
| 10 | See the |
| 11 | [wiki:Guidelines/Submissions Boost Library Submission Process] |
| 12 | page for a description of the process involved. |
| 13 | |
| 14 | == Requirements == #Requirements |
| 15 | |
| 16 | To avoid the frustration and wasted time of a proposed |
| 17 | library being rejected, it must meets these requirements: |
| 18 | |
| 19 | * The license must meet the [#License license requirements] |
| 20 | below. Restricted licenses like the GPL and |
| 21 | LGPL are not acceptable. |
| 22 | * The copyright [#Ownership ownership] must be |
| 23 | clear. |
| 24 | * The library must be generally useful and not restricted |
| 25 | to a narrow problem domain. |
| 26 | * The library must meet the [#Portability portability requirements] below. |
| 27 | * The library must come reasonably close to meeting the |
| 28 | [#Guidelines Guidelines] below. |
| 29 | * [#Design_and_Programming Design and Programming] |
| 30 | * [#Directory_structure Directory Structure] |
| 31 | * [#Documentation Documentation] |
| 32 | * The author must be willing to participate in discussions |
| 33 | on the mailing list, and to refine the library |
| 34 | accordingly. |
| 35 | |
| 36 | There's no requirement that an author read the mailing list |
| 37 | for a time before making a submission. It has been noted, |
| 38 | however, that submissions which begin "I just started to read |
| 39 | this mailing list ..." seem to fail, often embarrassingly. |
| 40 | |
| 41 | === License requirements === #License |
| 42 | |
| 43 | The preferred way to meet the license requirements is to use |
| 44 | the [http://www.boost.org/LICENSE_1_0.txt Boost Software License]. See |
| 45 | [http://www.boost.org/users/license.html license information]. If for |
| 46 | any reason you do not intend to use the Boost Software License, |
| 47 | please discuss the issues on the Boost |
| 48 | [http://www.boost.org/community/groups.html#main developers mailing list] |
| 49 | first. |
| 50 | |
| 51 | The license requirements: |
| 52 | |
| 53 | * Must be simple to read and understand. |
| 54 | * Must grant permission without fee to copy, use and modify |
| 55 | the software for any use (commercial and |
| 56 | non-commercial). |
| 57 | * Must require that the license appear on all copies of the |
| 58 | software source code. |
| 59 | * Must not require that the license appear with executables |
| 60 | or other binary uses of the library. |
| 61 | * Must not require that the source code be available for |
| 62 | execution or other binary uses of the library. |
| 63 | * May restrict the use of the name and description of the |
| 64 | library to the standard version found on the Boost web |
| 65 | site. |
| 66 | |
| 67 | === Portability requirements === #Portability |
| 68 | |
| 69 | * A library's interface must portable and not restricted to |
| 70 | a particular compiler or operating system. |
| 71 | * A library's implementation must if possible be portable |
| 72 | and not restricted to a particular compiler or operating |
| 73 | system. If a portable implementation is not possible, |
| 74 | non-portable constructions are acceptable if reasonably easy |
| 75 | to port to other environments, and implementations are |
| 76 | provided for at least two popular operating systems (such as |
| 77 | UNIX and Windows). |
| 78 | * There is no requirement that a library run on C++ |
| 79 | compilers which do not conform to the ISO standard. |
| 80 | * There is no requirement that a library run on any |
| 81 | particular C++ compiler. Boost contributors often try to |
| 82 | ensure their libraries work with popular compilers. The |
| 83 | boost/config.hpp |
| 84 | [http://www.boost.org/doc/libs/release/libs/config/config.htm configuration header] |
| 85 | is the preferred mechanism for working around |
| 86 | compiler deficiencies. |
| 87 | |
| 88 | Since there is no absolute way to prove portability, many |
| 89 | boost submissions demonstrate practical portability by |
| 90 | compiling and executing correctly with two different C++ |
| 91 | compilers, often under different operating systems. Otherwise |
| 92 | reviewers may disbelieve that porting is in fact practical. |
| 93 | |
| 94 | === Ownership === #Ownership |
| 95 | |
| 96 | Are you sure you own the library you are thinking of |
| 97 | submitting? "How to Copyright Software" by MJ Salone, Nolo |
| 98 | Press, 1990 says: |
| 99 | |
| 100 | Doing work on your own time that is very similar to |
| 101 | programming you do for your employer on company time can |
| 102 | raise nasty legal problems. In this situation, it's best to |
| 103 | get a written release from your employer in advance. |
| 104 | |
| 105 | Place a copyright notice in all the important files you |
| 106 | submit. Boost won't accept libraries without clear copyright |
| 107 | information. |
| 108 | |
| 109 | == Guidelines == #Guidelines |
| 110 | |
| 111 | Please use these guidelines as a checklist for preparing the |
| 112 | content a library submission. Not every guideline applies to |
| 113 | every library, but a reasonable effort to comply is |
| 114 | expected. |
| 115 | |
| 116 | === Design and Programming === #Design_and_Programming |
| 117 | |
| 118 | Aim first for clarity and correctness; optimization should |
| 119 | be only a secondary concern in most Boost libraries. |
| 120 | |
| 121 | Aim for ISO Standard C++. Than means making effective use of |
| 122 | the standard features of the language, and avoiding |
| 123 | non-standard compiler extensions. It also means using the C++ |
| 124 | Standard Library where applicable. |
| 125 | |
| 126 | Headers should be good neighbors. See the |
| 127 | [http://www.boost.org/development/header.html header policy]. See |
| 128 | [#Naming_consistency Naming consistency]. |
| 129 | |
| 130 | Follow quality programming practices. See, for example, |
| 131 | "Effective C++" 2nd Edition, and "More Effective C++", both by |
| 132 | Scott Meyers, published by Addison Wesley. |
| 133 | |
| 134 | Use the C++ Standard Library or other Boost libraries, but |
| 135 | only when the benefits outweigh the costs. Do not use libraries |
| 136 | other than the C++ Standard Library or Boost. See |
| 137 | [http://www.boost.org/development/reuse.html Library reuse]. |
| 138 | |
| 139 | Read |
| 140 | [http://www.boost.org/community/implementation_variations.html Implementation Variation] |
| 141 | to see how to supply performance, platform, or |
| 142 | other implementation variations. |
| 143 | |
| 144 | Read the |
| 145 | [http://www.boost.org/development/separate_compilation.html guidelines for libraries with separate source] |
| 146 | to see how to ensure that |
| 147 | compiled link libraries meet user expectations. |
| 148 | |
| 149 | Use the naming conventions of the C++ Standard Library (See |
| 150 | [#Naming Naming conventions rationale]): |
| 151 | |
| 152 | * Names (except as noted below) should be all lowercase, |
| 153 | with words separated by underscores. |
| 154 | * Acronyms should be treated as ordinary names (e.g. |
| 155 | `xml_parser` instead of |
| 156 | `XML_parser`). |
| 157 | * Template parameter names begin with an uppercase |
| 158 | letter. |
| 159 | * Macro (gasp!) names all uppercase and begin with |
| 160 | `BOOST_`. |
| 161 | |
| 162 | Choose meaningful names - explicit is better than implicit, |
| 163 | and readability counts. There is a strong preference for clear |
| 164 | and descriptive names, even if lengthy. |
| 165 | |
| 166 | Use exceptions to report errors where appropriate, and write |
| 167 | code that is safe in the face of exceptions. |
| 168 | |
| 169 | Avoid exception-specifications. See |
| 170 | [#Exception-specification exception-specification rationale]. |
| 171 | |
| 172 | Provide sample programs or confidence tests so potential |
| 173 | users can see how to use your library. |
| 174 | |
| 175 | Provide a regression test program or programs which follow |
| 176 | the [http://www.boost.org/development/test.html Test Policies and Protocols]. |
| 177 | |
| 178 | Although some boost members use proportional fonts, tabs, |
| 179 | and unrestricted line lengths in their own code, boost's widely |
| 180 | distributed source code should follow more conservative |
| 181 | guidelines: |
| 182 | |
| 183 | * Use fixed-width fonts. See [#code_fonts fonts rationale]. |
| 184 | * Use spaces rather than tabs. See [#Tabs tabs rationale]. |
| 185 | * Limit line lengths to 80 characters. |
| 186 | |
| 187 | End all documentation files (HTML or otherwise) with a |
| 188 | copyright message and a licensing message. See the |
| 189 | [http://www.boost.org/users/license.html license information] page for the |
| 190 | preferred form. |
| 191 | |
| 192 | Begin all source files (including programs, headers, |
| 193 | scripts, etc.) with: |
| 194 | |
| 195 | * A comment line describing the contents of the file. |
| 196 | * Comments describing copyright and licensing: again, the |
| 197 | preferred form is indicated in the |
| 198 | [http://www.boost.org/users/license.html license information] page |
| 199 | * Note that developers should not provide a copy of |
| 200 | `LICENSE_1_0.txt` with their libraries: Boost |
| 201 | distributions already include a copy in the Boost root |
| 202 | directory. |
| 203 | * A comment line referencing your library on the Boost web |
| 204 | site. For example: |
| 205 | |
| 206 | // See http://www.boost.org/libs/foo for library home page. |
| 207 | |
| 208 | Where `foo` is the directory name (see below) |
| 209 | for the library. As well as aiding users who come across a |
| 210 | Boost file detached from its documentation, some of Boost's |
| 211 | automatic tools depend on this comment to identify which |
| 212 | library header files belong to. |
| 213 | |
| 214 | Make sure your code compiles in the presence of the |
| 215 | `min()` and `max()` macros. Some platform |
| 216 | headers define `min()` and `max()` macros |
| 217 | which cause some common C++ constructs to fail to compile. Some |
| 218 | simple tricks can protect your code from inappropriate macro |
| 219 | substitution: |
| 220 | |
| 221 | * If you want to call `std::min()` or |
| 222 | `std::max()`: |
| 223 | * If you do not require argument-dependent look-up, use |
| 224 | `(std::min)(a,b)`. |
| 225 | * If you do require argument-dependent look-up, you |
| 226 | should: |
| 227 | * `#include <boost/config.hpp>` |
| 228 | * Use `BOOST_USING_STD_MIN();` to bring |
| 229 | `std::min()` into the current scope. |
| 230 | * Use `min BOOST_PREVENT_MACRO_SUBSTITUTION |
| 231 | (a,b);` to make an argument-dependent call to |
| 232 | `min(a,b)`. |
| 233 | * If you want to call |
| 234 | `std::numeric_limits<int>::max()`, use |
| 235 | `(std::numeric_limits<int>::max)()` |
| 236 | instead. |
| 237 | * If you want to call a `min()` or |
| 238 | `max()` member function, instead to doing |
| 239 | `obj.min()`, use `(obj.min)()`. |
| 240 | * If you want to declare or define a function or a member |
| 241 | function named `min` or `max`, then you |
| 242 | must use the `BOOST_PREVENT_MACRO_SUBSTITUTION` |
| 243 | macro. Instead of writing `int min() { return 0; |
| 244 | }` you should write `int min |
| 245 | BOOST_PREVENT_MACRO_SUBSTITUTION () { return 0; }` This |
| 246 | is true regardless if the function is a free (namespace |
| 247 | scope) function, a member function or a static member |
| 248 | function, and it applies for the function declaration as well |
| 249 | as for the function definition. |
| 250 | |
| 251 | === Directory Structure and Filenames === #Directory_structure |
| 252 | |
| 253 | Naming requirements ensure that file and directory names are |
| 254 | relatively portable, including to ISO 9660:1999 (with |
| 255 | extensions) and other relatively limited file systems. |
| 256 | Superscript links are provided to detailed rationale for each |
| 257 | choice. |
| 258 | |
| 259 | * Names must contain only |
| 260 | '''lowercase'''^[#Filename_rationale_1 1]^ ASCII letters |
| 261 | (`'a'`-`'z'`), numbers |
| 262 | (`'0'`-`'9'`), underscores |
| 263 | (`'_'`), hyphens (`'-'`), and periods |
| 264 | (`'.'`). Spaces are not allowed^[#Filename_rationale_2 2]^. |
| 265 | * Directory names must not contain periods |
| 266 | (`'.'`)^[#Filename_Rationale_3 3]^. |
| 267 | * The first and last character of a file name must not be a |
| 268 | period (`'.'`)^[#Filename_rationale_4 4]^. |
| 269 | * The first character of names must not be a hyphen |
| 270 | (`'-'`)^[#Filename_rationale_5 5]^. |
| 271 | * The maximum length of directory and file names is 31 |
| 272 | characters^[#Filename_rationale_6 6]^. |
| 273 | * The total path length must not exceed 207 |
| 274 | characters^[#Filename_rationale_7 7]^. |
| 275 | |
| 276 | Other conventions ease communication: |
| 277 | |
| 278 | * Files intended to be processed by a C++ compiler as part |
| 279 | of a translation unit should have '''a three-letter |
| 280 | filename extension ending in "pp"'''. Other files |
| 281 | should ''not'' use extensions ending in "pp". This |
| 282 | convention makes it easy to identify all of the C++ source in |
| 283 | Boost. |
| 284 | * All libraries have at their highest level a primary |
| 285 | directory named for the particular library. See |
| 286 | [#Naming_consistency Naming consistency]. The primary |
| 287 | directory may have sub-directories. |
| 288 | * For very simple libraries implemented entirely within the |
| 289 | library header, all files go in the primary directory (except |
| 290 | headers, which go in the boost header directory). |
| 291 | |
| 292 | ==== Boost standard sub-directory names ==== #subdirectory |
| 293 | |
| 294 | ||Sub-directory||Contents ||Required || |
| 295 | ||`build` ||Library build files such as a Jamfile. ||If any build files. || |
| 296 | ||`doc` ||Documentation (HTML) files. ||If several doc files. || |
| 297 | ||`example` ||Sample program files. ||If several sample files.|| |
| 298 | ||`src` ||Source files which must be compiled to build the library.||If any source files. || |
| 299 | ||`test` ||Regression or other test programs or scripts. ||If several test files. || |
| 300 | |
| 301 | ==== Redirection ==== #Redirection |
| 302 | |
| 303 | The primary directory should always contain a file named |
| 304 | index.html (or index.htm). Authors have requested this so that |
| 305 | they can publish URL's in the form |
| 306 | ''http://www.boost.org/libs/lib-name'' with the assurance a |
| 307 | documentation reorganization won't invalidate the URL. Boost's |
| 308 | internal tools are also simplified by knowing that a library's |
| 309 | documentation is always reachable via the simplified URL. |
| 310 | |
| 311 | If the documentation is in a doc sub-directory, the primary |
| 312 | directory index.html file should just do an automatic |
| 313 | redirection to the doc subdirectory: |
| 314 | {{{ |
| 315 | #!html |
| 316 | <pre> |
| 317 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
| 318 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
| 319 | |
| 320 | <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> |
| 321 | <head> |
| 322 | <title>Boost.<var>Name</var> Documentation</title> |
| 323 | <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" /> |
| 324 | <meta http-equiv="refresh" content="0; URL=doc/index.html" /> |
| 325 | </head> |
| 326 | |
| 327 | <body> |
| 328 | Automatic redirection failed, please go to <a href= |
| 329 | "doc/index.html">doc/index.html</a> |
| 330 | </body> |
| 331 | </html> |
| 332 | </pre> |
| 333 | }}} |
| 334 | |
| 335 | === Naming consistency === #Naming_consistency |
| 336 | |
| 337 | As library developers and users have gained experience with |
| 338 | Boost, the following consistent naming approach has come to be |
| 339 | viewed as very helpful, particularly for larger libraries that |
| 340 | need their own header subdirectories and namespaces. |
| 341 | |
| 342 | Here is how it works. The library is given a name that |
| 343 | describes the contents of the library. Cryptic abbreviations |
| 344 | are strongly discouraged. Following the practice of the C++ |
| 345 | Standard Library, names are usually singular rather than |
| 346 | plural. For example, a library dealing with file systems might |
| 347 | chose the name "filesystem", but not "filesystems", "fs" or |
| 348 | "nicecode". |
| 349 | |
| 350 | * The library's primary directory (in parent |
| 351 | ''boost-root/libs'') is given that same name. For |
| 352 | example, ''boost-root/libs/filesystem''. |
| 353 | * The library's primary header directory (in parent |
| 354 | ''boost-root/boost'') is given that same name. For |
| 355 | example, ''boost-root/boost/filesystem''. |
| 356 | * The library's primary namespace (in parent |
| 357 | ''::boost'') is given that same name, except when |
| 358 | there's a component with that name (e.g., |
| 359 | ''boost::tuple''), in which case the namespace name is |
| 360 | pluralized. For example, ''::boost::filesystem''. |
| 361 | |
| 362 | When documenting Boost libraries, follow these conventions |
| 363 | (see also the following section of this document): |
| 364 | |
| 365 | * The library name is set in roman type. |
| 366 | * The library name is capitalized. |
| 367 | * A period between "Boost" and the library name (e.g., |
| 368 | Boost.Bind) is used if and only if the library name is not |
| 369 | followed by the word "library". |
| 370 | * The word "library" is not part of the library name and is |
| 371 | therefore lowercased. |
| 372 | |
| 373 | Here are a few examples of how to apply these |
| 374 | conventions: |
| 375 | |
| 376 | * Boost.Bind was written by Peter Dimov. |
| 377 | * The Boost Bind library was written by Peter Dimov. |
| 378 | * I regularly use Bind, a Boost library written by Peter Dimov. |
| 379 | |
| 380 | === Documentation === #Documentation |
| 381 | |
| 382 | Even the simplest library needs some documentation; the |
| 383 | amount should be proportional to the need. The documentation |
| 384 | should assume the readers have a basic knowledge of C++, but |
| 385 | are not necessarily experts. |
| 386 | |
| 387 | The format for documentation should be HTML, and should not |
| 388 | require an advanced browser or server-side extensions. Style |
| 389 | sheets are acceptable. ECMAScript/JavaScript is not acceptable. |
| 390 | The documentation entry point should always be a file named |
| 391 | index.html or index.htm; see [#Redirection Redirection]. |
| 392 | |
| 393 | There is no single right way to do documentation. HTML |
| 394 | documentation is often organized quite differently from |
| 395 | traditional printed documents. Task-oriented styles differ from |
| 396 | reference oriented styles. In the end, it comes down to the |
| 397 | question: Is the documentation sufficient for the mythical |
| 398 | "average" C++ programmer to use the library successfully? |
| 399 | |
| 400 | Appropriate topics for documentation often include: |
| 401 | |
| 402 | * General introduction to the library. The introduction |
| 403 | particularly needs to include: |
| 404 | * A very high-level overview of what the library is |
| 405 | good for, and perhaps what it isn't good for, |
| 406 | understandable even by those with no prior knowledge of |
| 407 | the problem domain. |
| 408 | * The simplest possible ("hello world") example of |
| 409 | using the library. |
| 410 | * Tutorial covering basic use cases. |
| 411 | * Reference documentation: |
| 412 | * Description of each class. |
| 413 | * Relationship between classes. |
| 414 | * For each function, as applicable, description, |
| 415 | requirements (preconditions), effects, post-conditions, |
| 416 | returns, and throws. |
| 417 | * Discussion of error detection and recovery |
| 418 | strategy. |
| 419 | * How to compile and link. |
| 420 | * How to test. |
| 421 | * Version or revision history. |
| 422 | * Rationale for design decisions. See [#Rationale Rationale rationale]. |
| 423 | * Acknowledgements. See [#Acknowledgements Acknowledgments rationale.] |
| 424 | |
| 425 | If you need more help with how to write documentation you |
| 426 | can check out the article on |
| 427 | [http://www.boost.org/doc/libs/release/more/writingdoc/index.html Writing Documentation for Boost]. |
| 428 | |
| 429 | == Rationale == #Rationale |
| 430 | |
| 431 | Rationale for some of the requirements and guidelines |
| 432 | follows. |
| 433 | |
| 434 | === Exception-specification rationale === #Exception-specification |
| 435 | |
| 436 | Exception specifications [ISO 15.4] are sometimes coded to |
| 437 | indicate what exceptions may be thrown, or because the |
| 438 | programmer hopes they will improve performance. But consider |
| 439 | the following member from a smart pointer: |
| 440 | {{{ |
| 441 | T& operator*() const throw() { return *ptr; } |
| 442 | }}} |
| 443 | |
| 444 | This function calls no other functions; it only manipulates |
| 445 | fundamental data types like pointers Therefore, no runtime |
| 446 | behavior of the exception-specification can ever be invoked. |
| 447 | The function is completely exposed to the compiler; indeed it |
| 448 | is declared inline Therefore, a smart compiler can easily |
| 449 | deduce that the functions are incapable of throwing exceptions, |
| 450 | and make the same optimizations it would have made based on the |
| 451 | empty exception-specification. A "dumb" compiler, however, may |
| 452 | make all kinds of pessimizations. |
| 453 | |
| 454 | For example, some compilers turn off inlining if there is an |
| 455 | exception-specification. Some compilers add try/catch blocks. |
| 456 | Such pessimizations can be a performance disaster which makes |
| 457 | the code unusable in practical applications. |
| 458 | |
| 459 | Although initially appealing, an exception-specification |
| 460 | tends to have consequences that require '''very''' |
| 461 | careful thought to understand. The biggest problem with |
| 462 | exception-specifications is that programmers use them as though |
| 463 | they have the effect the programmer would like, instead of the |
| 464 | effect they actually have. |
| 465 | |
| 466 | A non-inline function is the one place a "throws nothing" |
| 467 | exception-specification may have some benefit with some |
| 468 | compilers. |
| 469 | |
| 470 | === Naming conventions rationale === #Naming |
| 471 | |
| 472 | The C++ standard committee's Library Working Group discussed |
| 473 | this issue in detail, and over a long period of time. The |
| 474 | discussion was repeated again in early boost postings. A short |
| 475 | summary: |
| 476 | |
| 477 | * Naming conventions are contentious, and although several |
| 478 | are widely used, no one style predominates. |
| 479 | * Given the intent to propose portions of boost for the |
| 480 | next revision of the C++ standard library, boost decided to |
| 481 | follow the standard library's conventions. |
| 482 | * Once a library settles on a particular convention, a vast |
| 483 | majority of stakeholders want that style to be consistently |
| 484 | used. |
| 485 | |
| 486 | === Source code fonts rationale === #code_fonts |
| 487 | |
| 488 | Dave Abrahams comments: An important purpose (I daresay the |
| 489 | primary purpose) of source code is communication: the |
| 490 | documentation of intent. This is a doubly important goal for |
| 491 | boost, I think. Using a fixed-width font allows us to |
| 492 | communicate with more people, in more ways (diagrams are |
| 493 | possible) right there in the source. Code written for |
| 494 | fixed-width fonts using spaces will read reasonably well when |
| 495 | viewed with a variable-width font, and as far as I can tell |
| 496 | every editor supporting variable-width fonts also supports |
| 497 | fixed width. I don't think the converse is true. |
| 498 | |
| 499 | === Tabs rationale === #Tabs |
| 500 | |
| 501 | Tabs are banned because of the practical problems caused by |
| 502 | tabs in multi-developer projects like Boost, rather than any |
| 503 | dislike in principle. See [http://www.boost.org/community/groups.html#archive mailing list archives]. |
| 504 | Problems include maintenance of a single source file by |
| 505 | programmers using tabs and programmers using spaces, and the |
| 506 | difficulty of enforcing a consistent tab policy other than just |
| 507 | "no tabs". Discussions concluded that Boost files should either |
| 508 | all use tabs, or all use spaces, and thus the decision to stick |
| 509 | with spaces. |
| 510 | |
| 511 | === Directory and File Names rationale === #FileNamesRat |
| 512 | |
| 513 | 1. Some legacy file systems require |
| 514 | single-case names. Single-case names eliminate casing mistakes |
| 515 | when moving from case-insensitive to case-sensitive file |
| 516 | systems. |
| 517 | |
| 518 | 2. This is the lowercase portion of |
| 519 | the POSIX portable filename character set. To quote the POSIX |
| 520 | standard, "Filenames should be constructed from the portable |
| 521 | filename character set because the use of other characters can |
| 522 | be confusing or ambiguous in certain contexts." |
| 523 | |
| 524 | 3. Strict implementations of ISO |
| 525 | 9660:1999 and some legacy operating systems prohibit dots in |
| 526 | directory names. The need for this restriction is fading, and |
| 527 | it will probably be removed fairly soon. |
| 528 | |
| 529 | 4. POSIX has special rules for names |
| 530 | beginning with a period. Windows prohibits names ending in a |
| 531 | period. |
| 532 | |
| 533 | 5. Would be too confusing or ambiguous in certain contexts. |
| 534 | |
| 535 | 6. We had to draw the line |
| 536 | somewhere, and so the limit imposed by a now obsolete Apple |
| 537 | file system was chosen years ago. It still seems a reasonable |
| 538 | limit to aid human comprehension. |
| 539 | |
| 540 | 7. ISO 9660:1999. |
| 541 | |
| 542 | === ECMAScript/JavaScript rationale === #JavaScript |
| 543 | |
| 544 | Before the 1.29.0 release, two Boost libraries added |
| 545 | ECMAScript/JavaScript documentation. Controversy followed (see |
| 546 | [http://www.boost.org/community/groups.html#archive mailing list archives]), |
| 547 | and the developers were asked to remove the |
| 548 | ECMAScript/JavaScript. Reasons given for banning included: |
| 549 | |
| 550 | * Incompatible with some older browsers and some text based |
| 551 | browsers. |
| 552 | * Makes printing docs pages difficult. |
| 553 | * Often results in really bad user interface design. |
| 554 | * "It's just annoying in general." |
| 555 | * Would require Boost to test web pages for |
| 556 | ECMAScript/JavaScript compliance. |
| 557 | * Makes docs maintenance by other than the original |
| 558 | developer more difficult. |
| 559 | |
| 560 | === Rationale rationale === #Rationale_rationale |
| 561 | |
| 562 | Rationale is defined as "The fundamental reasons for |
| 563 | something; basis" by the American Heritage Dictionary. |
| 564 | |
| 565 | Beman Dawes comments: Failure to supply contemporaneous |
| 566 | rationale for design decisions is a major defect in many |
| 567 | software projects. Lack of accurate rationale causes issues to |
| 568 | be revisited endlessly, causes maintenance bugs when a |
| 569 | maintainer changes something without realizing it was done a |
| 570 | certain way for some purpose, and shortens the useful lifetime |
| 571 | of software. |
| 572 | |
| 573 | Rationale is fairly easy to provide at the time decisions |
| 574 | are made, but very hard to accurately recover even a short time |
| 575 | later. |
| 576 | |
| 577 | === Acknowledgements rationale === #Acknowledgements |
| 578 | |
| 579 | As a library matures, it almost always accumulates |
| 580 | improvements suggested to the authors by other boost members. |
| 581 | It is a part of the culture of boost.org to acknowledge such |
| 582 | contributions, identifying the person making the suggestion. |
| 583 | Major contributions are usually acknowledged in the |
| 584 | documentation, while minor fixes are often mentioned in |
| 585 | comments within the code itself. |