This design note specifies a standard portable format for distributing Dylan source code.
Dylan Design Notes
Dylan Design Notes: #33: Headers for Dylan Source Files (Addition)
#33: Headers for Dylan Source Files (Addition)Version 1, January 1994 Copyright (c) 1993-1994, Apple Computer
The body consists of zero or more outer expressions and comments, all of which must be in the same syntax.
The header consists of zero or more keyword-value pairs, as follows:
Blank lines may not appear in the header. A blank line defines the end of the header and the beginning of the code body. It is not part of the code body.
The following standard keywords are defined:
module: module-name [Header keyword]Expressions in the file are associated with the named module. This keyword is required.
author: arbitrary text [Header keyword] copyright:arbitrary text [Header keyword] version: arbitrary text [Header keyword]
These are provided for standardization. These are optional, and can be ignored by the implementation.
For example, a typical Dylan source file might look like this:
module: quickdraw author: J. Random Rect Linear Wheels, Inc., "Where quality is a slogan!" email@example.com copyright: (c) 1993 Linear Wheels, Inc., All rights reserved version: 1.3 alpha (not fully tested) define-constant $black-color ... ...
This change will enhance ability to share code between development environments. It will facilitate code-management tasks in file-based environments by formalizing code attributes like syntax, authorship, copyright, version control, etc. It will facilitate management of code repositories (e.g. file servers, cd-roms, particularly in multi-platform environments) by providing readily browsable information to tools with minimal awareness of Dylan.
Keyword-value pairs are relatively easy for machines to parse and generate,and are relatively legible to humans. Also, this allows for future extensions by adding keywords.
Next chapter: #34: Select Ordering (Clarification)