This revision: 5.00.02, 15 August 2005
This private set of pages contains the current state of the book "Eiffel: The Language", third edition. All the material is copyright 1988-2002, Bertrand Meyer. (As you will see in the text, the copyright for the language reference and ELKS parts is meant to be released for free use once the book is in final form.) These pages are meant for consultation by colleagues and friends, especially members of the ECMA Eiffel standardization committee. To avoid lots of potential trouble, in particular with the publisher, please do not link to the actual PDF, only to the present page at http://se.ethz.ch/~meyer/ongoing/etl/, and do not make any publicly accessible copies.
Responsibility for the language now rests with ECMA-TC39-TG4, the technical committee that is standardizing the Eiffel language at ECMA. To participate in the committee you may join ECMA. The present pages serve as working material for the ECMA committee but have no official ECMA status.
The chapters are marked as being in one of the following three states:
"Not done": the chapter is a bare mechanical translation of the original troff text of the first edition. It usually has many inconsistencies, errors, missing elements and bizarre properties (even if some extracts appear reasonable). Do not trust anything in this chapter. In a few cases the chapter is just a placeholder.
"In progress": some work has been done on this chapter, but it is far from complete.
No particular mention: the chapter is in reasonably clean form, although in most cases it hasn't been seriously proofread.
Of particular interest is the "changes" appendix which lists the changes with previous versions. I try to keep it as up to date as possible.
You can see the effect of these changes in the PDF chapters |
15 August 2005: Version 5.02.00-0
Chapters 2 to 9 have been processed. Rest hasn't been touched.
25 June 2005: Version 5.00.00
12 June 2005: Version 5.00.00-4
23 May 2005: Version 5.00.00-2
21 May 2005: Version 5.00.00-1
6 May 2005: Version 5.00.00-0
5 May 2005: Version 4.99.99-9
Change of mode of operation: I am no longer including diff files in the text. Instead there is a new (>45 MB) file ALLDIFFS.pdf which records all the successive diffs. Alternatively: http://tinyurl.com/dfoq2
This is the version to be submitted to ECMA Friday early morning. Please tell me of any typos that you find until then.
5 May 2005: Version 4.70.00-0
Added the notion of "non-production syntax rule" throughout. Added such a rule for assertion clauses.
Diffs added at the end.
Note that the FrameMaker diffs shows an entire chapter as different towards the beginning. This is obviouly a bug; just ignore that part. There actually only a few differences.
4 May 2005: Version 4.69.00-0
3 May 2005: Version 4.68.00-0
3 May 2005: Version 4.67-02.0
3 May 2005: Version 4.67.00-1
3 May 2005: Version 4.67.00-0
2 May 2005: Version 4.66.01-0
1 May 2005: Version 4.66.00-0
30 April 2005: Version 4.65.00-0
24 April 2005: Version 4.63.00
23 April 2005: Version 4.62.00-0
22 April 2005: Version 4.61.00-0
22 April 2005: Version 4.60.00-0
http://www.inf.ethz.ch/~meyer/ongoing/etl/(see here)
is the set of diffs with 4.58. PLEASE REVIEW IT. Please ignore the differences in the front matter (already present in 4.59, but there was no diff), already reviewed, and examine the rest of the document.
22 April 2005: Version 4.60.00-0
17 April 2005: Version 4.59.00-0
10 April 2005: Version 4.58.00-0
10 April 2005: Version 4.58.00-0
9 April 2005: Version 4.57.00-0
9 April 2005: Version 4.57.00-0
3 April 2005: Version 4.56.00-1
Processed Eric's round 3 remarks on front matter and chapters 2 to 4.
Processed Round 1 remarks and consequences of last phone discussion on chapter 5 (features)
30 March 2005: Version 4.55.00-1
28 March 2005: Version 4.54.00-1
Diff file regenerated (still diffs with 4.53).
Full pass through the book to underline defined terms in rules and definitions.
Used the opportunity to improve a bit the rules about genericity and several others (e.g. "Converting to and from a type" in the conversion chapter).
Changed "conversion function" to "conversion query".
27 March 2005: Version 4.54.00-0
Revised creation and assignment chapters. Processed all of Eric's comments except those relating to assertions (in creation).
Removed assignment attempt stuff.
Simplified and improved Assigner_call description.
First attempt at reattachment semantics; this is incomplete and needs checking.
22 March 2005: Version 4.53.02-0
Almost no changes of substance, but I continued to fine-tune the format for the standard.
I brought the "Explanatory text" inserts up to and including the Routine chapter.
Next release will be next week-end.
20 March 2005: Version 4.53.01-2
Started removing assignment attempt (syntax and validity only so far, for standard)
Note that individual chapters are not up to date with my last changes due to a network problem at ETH (I hope the system administrators will fix it on Monday). The standard text (see here) is, as well as the full book text (see here)
20 March 2005: Version 4.53.00-1
19 March 2005: Version 4.53.00-0
Second pass on expression chapter (see here).
In syntax variants, replaced Formal by Read_only (otherwise Current was not an expression!).
Integrated Eric's comments:
18 March 2005: Version 4.52.05-0
18 March 2005: Version 4.52.04-0
More fixes to call chapter (see here)
17 March 2005: Version 4.52.02-0
Changed colors in standard text -- please comment if you have better ideas.
Introduced new convention in response to requests: terms used in a definition or rule are doubly underlined if they are themselves formally defined elsewhere. The double underline is a bit heavy but I didn't find anything better so far. Single underline makes one want to click; italics conflicts with other uses of (colored) italics; I tried using a different font but it's ugly; and FrameMaker doesn't have dotted underline, which would be my preferred convention.
Continuing revisions of (see here):
In this version I did not change the order of topics (current object, target object etc.); I'll do it later tonight if I have the time, otherwise I will just give up for the moment.
In type chapter (see here):
16 March 2005: Version 4.52.01-0
Corrections to call chapter (see here) after this morning's discussion
15 March 2005: Version 4.52.00-0
The goal of this version is to conclude the call chapter (see here) (as the aim for 4.51 was to conclude (see here)).
On the call chapter:
In the type checking chapter (see here):
In the exceptions chapter (see here):
15 March 2005: Version 4.51.00-0
New diff file: (see here)
Fixing expression chapter (see here) after this morning's discussion:
In call chapter (see here):
In feature chapter (see here):
In redeclaration chapter (see here):
Worked on the front matter to prepare for appearance as a standard. The content is tentative; I will check with ECMA. Please check credits for any mistake.
12 March 2005: Version 4.50.01-0
Introduced explicit conversion through feature of TYPE: ELKS chapter (see here),
In the expression chapter (see here):
Reorganized chapter, changing order of sections
Moved equality discussion to chapter on copy/equality chapter (see here).
Removed VWEQ constraint (see issue OPV).
Changed format of operator precedence spec so that it now appears in standard.
Started to take into account Eric's comments on the chapter. Need to handle Precursor (not finished yet).
Rewrote section on explicit conversion, taking advantage of feature in TYPE (see above).
- Entities (20.6, VEEN)
- New section 28.8 on Object Test
- New chapter in progress: 25 on eradicating void calls void.pdf.
11 March 2005: Version 4.49.03.0
11 March 2005: Version 4.49.03.0
11 March 2005: Version 4.49.03.0
11 March 2005: Version 4.49.03.0
6 March 2005: Version 4.49.02.0
6 March 2005: Version 4.49.01-2
5 March 2005: Version 4.49.01-1
5 March 2005: Version 4.49.01-0
Introduced Class_or_tuple_type (see email discussion). Some rather delicate changes, in particular to definition of base type of a formal generic.
3 March 2005: Version 4.49.00-0
Conversion type in definition of simple client: not integrated.
Did not yet update terminology replacing "short" etc.
Only a few updates on assertion chapter.
Removed the discussion of "static type" at the end of 10.26 since there is a better definition in the chapter on expressions (28.13; Ialso improved it).
Diffs with previous version: DIFF4-49-00(see here)
Earlier diffs: DIFF4-48-05(see here)
2 March 2005: Version 4.48.05-0
Updated TYPE; replaced is_same_type by redefinition of is_equal; added `adapted alias []'.
Removed all `require other /= Void' preconditions and most `ensure Result /= Void' postconditions; added a few ? to arguments.
The good news is that I found only one need for a ? (in STD_FILES). But all arguments need to be checked to see if more could legitimately be void and hence require a ?.
To all "-" functions, added a postcondition Result + other = Current This may not work for REAL types and if so will be replaced by a comment.
General cleanup, put assertion tags in roman, replaced "note" by "comment" when used as note tag.
Replaced all "empty" features by "is_empty"
Added INTERVAL class, with PART_COMPARABLE generic parameter. Many classes now have an alias ".." function that returns an interval; as a consequence ".." is a standard operator. (This is largely the consequence of a suggestion by Marcel Satchell. It seems right but I can roll back if the change turns out to be a bad idea.) An ARRAY now has an associated interval. One of the advantages of having INTERVAL and the associated ".." operator is the ability to write assertions such as (|1..count|).for_all (...).
No change to language reference.
There will probably be another version later today (meaning tomorrow Zurich time).
2 March 2005: Version 4.48.04-0
2 March 2005: Version 4.48.03-1
1 March 2005: Version 4.48.02-4
1 March 2005: Version 4.48.02-2
1 March 2005: Version 4.48.02-1
28 February 2005: Version 4.48.02-0
Target expressions (new section 24.6); used this opportunity to do some cleaning in the Call chapter (see here).
Unfolfed form of a multiple declaration (5.18).
Rules on feature declarations (5.20), in particular aliases. There is a new "alias validity" rule that also applies to renaming.
Discussion of renaming
Started to explain assigner procedures
Removed most references to the earlier version of the "attached" mechanism.
25 February 2005: Version 4.48.01-0
20 February 2005: Version 4.48.00-2
20 February 2005: Version 4.48.00-1
19 February 2005: Version 4.48.00-0
19 February 2005: Version 4.47.05-0
18 February 2005: Version 4.47.04-1
18 February 2005: Version 4.47.04-0
17 February 2005: Version 4.47.03-1
16 February 2005: Version 4.47.02-2
17 February 2005: Version 4.47.02-1
15 February 2005: Version 4.47.02-0
-- Change log lost for January and early February versions --
5 December 2004: Version 4.46.00-0
Started to remove references to DOUBLE (partially only, the only advantage of Frame 7.1 was the ability to search through a full book).
4 December 2004: Version 4.45.02-0
4 December 2004: Version 4.45.01-0
Removed the notion of "Remote_constant", now covered by Non_object_call.
28 November 2004: Version 4.45.00-4
28 November 2004: Version 4.45.00-3
28 November 2004: Version 4.45.00-1
20 November 2004: Version 4.45.00-1
31 October 2004: Version 4.45.00-0
17 October 2004: Version 4.44.02-0
17 October 2004: Version 4.44.02-0
5 April 2004: Version 4.42.00-2
4 April 2004: Version 4.42.00-01
21 Sept 2002: Version 4.42-00-00
I might rename "non-conforming inheritance" as "expanded inheritance" since this is what people tend to use.
I started some time ago updating the text to take into account the changes decided at the Santa Barbara meeting in August (contracts on attributes etc.). It's actually rather delicate since it affects many parts of the text and puts into question the very structure of the exposition, so it's going to take considerablee time.
11 June 2002: Version 4.40-00-11
31 December 2001: Version 4.40-00-00
Added considerable generality to the once mechanism, allowing once keys. This is in the routine chapter and, mostly, in a section of the call semantics chapter (that's the only part of the chapter worked on so far). This has also meant changing the syntax of Debug since there is now no more notion of Debug_key and Debug_key_list, simply Key_list used for both Once and Debug.
Removed the assignment attribute mechanism altogether. This turned out to be too messy for its sake.
Other changes: chapter on older changes released; moved the long tutorial to the end of the book. Corrected and updated the recently done chapter on copying and equality and chapter on control structures to integrate comments by Marcel Satchell.
Finally, I updated the change appendix, the ELKS appendix and the long tutorial to reflect all the recent changes.
29 December 2001: Version 4.39-00-00:
Lengthened the version number convention to give myself more opportunities of self-pats in the back for minute improvements. The convention (only slightly adjusted, and remaining compatible with previous version number) is:
Version number is 4.AA-BB-CC
When 4 turns to 5 the book is ready for publication.
AA (currently 79) is incremented for any major language change or addition.
BB is incremented for any small language change or addition.
CC is incremented for changes and additions to the text without significant language change.
8 December 2001: Version 4.38-1:
18 December 2001: Version 4.37-3:
26 December 2000: Version 4.37-1:
25 December 2000: Version 4.36-3:
19 December 2000: Version 4.36-0:
This version adds a simple mechanism for removing name clashes between classes. ISE Eiffel (I don't know about others) had previously used, since 4.0 or so, a Lace renaming mechanism, but this has proved to be unsatisfactory. The policy that has been adopted now results from careful evaluation of those in other languages, in particular namespaces as present in recent versions of C++ and Smalltalk, as well as the .NET model and C# (requiring, in the latter case, the use of a keyword `using' similar to Ada's `with'). We found that this was overkill and adopted a much simpler solution. Within a cluster, no two classes may have the same name. A conflict arises if and only if you try to use a class name C such that no class of that name exists in the current cluster (if one does, it will be the one selected), but two or more classes are called C in other clusters. Then, to refer to that class, you must qualify it by its cluster name: cluster1::C or cluster2::C. Even when not required through this rule, such a fully qualified name is now a valid form of Class_name, valid anywhere we need a class name (e.g. in a type name, or in a selective exports clause), with the exception of a class definition itself,
class C
where C must be unqualified.
The cluster name comes from the outside, typically an Ace file or equivalent. It is thus local to every system, although a library may come with a mini-Ace, to be included as is, and specifying a cluster name, so that systems using the library don't have to define their own cluster names from the library.
We haven't implemented this mechanism but feel that it's the right way to go -- simple, not overkill, and safe. I am not too keen on the :: symbol, but don't have a better suggestion now. (I'd originally used a single :, but a declaration of the form x: cluster_name:CLASS_NAME seems a bit strange.)
The changes are mostly in the last section of the Architecture chapter (currently chapter 3).
19 December 2000: Version 4.35-3:
14 December 2000: Version 4.35-1:
13 December 2000: Version 4.35-0:
I have integrated a new syntax and various simplifications for agents. Other than errors (which probably remain, since I haven't reviewed the text extensively) I hope this is a final version of the mechanism. It uses a keyword syntax and has a simple, general notation for inline agents.
(Note: I find no record here of Version 4.34-0, so I must have forgotten to update the Web page back in September. It was the first step towards this update of the agent mechanism.)
25 August 2000: Version 4.33-1:
Updated the appendix on reserved words and special symbols to reflect recent changes, in particular by adding the keyword agent.
25 August 2000: Version 4.33-0:
Also: in the discussion of Verbatim_string in the expression chapter, refined the notion further (see earlier change) to allow for left-justified verbatim strings. As before the expression chapter is still not ready, but some parts are, including the relevant one for this change: the section on manifest strings, currently 26.18.
13 August 2000: Version 4.32-0:
21 July 2000: Version 4.31-0:
Note that the expression chapter is still not ready, but some parts are, including the relevant one for this change: the section on manifest strings, currently 26.18.
4 May 2000: Version 4.27-0:
As a consequence I have also had to make fairly extensive changes to Feature adaptation chapter released two weeks ago. To make them easier to spot I am also releasing a change bar version of the Feature Adaptation chapter (which will be removed in a couple of weeks). The most significant changes start on page 328.
A minor addition has also been brought to the conformance/convertibility chapter (definition of "conformance path"). Several other chapters have been touched as well.
As usual, the changes appendix has been brought up to date.
4 May 2000: Version 4.26-0:
21 February 2000: Version 4.25-1:
21 February 2000: Version 4.25-0:
17 February 2000: Version 4.24-0:
Perhaps incautiously, I have gone ahead and introduced the notion of non-polymorphic inheritance in all the previously written chapters. (The main affected ones are features and conformance/convertibility.
The bad news is that I feel pretty happy with myself; the impact on the presentation has been remarkably simple. None of the conformance or convertibility rules need to be changed! All I have had to do is include a new optional component in the syntax, and a number of explanations and extra examples. This is bad news because when I feel that happy it's usually a sign that I should have waited the proverbial night and that there is probably something rotten in the kingdom, which one of the distinguished members of this group will undoubtedly discover right away. Well, I am foolish enough to publish the material as is tonight. We'll see (after the usual 90 minutes or so, only about 75 when this message reaches you).
Note that the simplicity of the change comes in part from the use of the keyword expanded for what Jim Nelson called flat inheritance. Although the purpose of a language design is not primarily to make the scribe's task easier, I -- being the self-appointed scribe -- am finding the appeal of self-convenience hard to resist in this case.
Before I move to anything else I have to revisit the conformance rules on tuples, which I don't think are right although I don't yet know the proper fix.
February 2000: Version 4.23-0:
Following a comment by Marcel Satchell I have updated the validity constraint for convertibility (CNCP, section 15.13, subsection "Conversion rules", currently page 449) to account for a case that I had missed regarding generic types. This was a serious mistake and I am grateful he found it.
Other changes: I fixed a number of typos (thanks to Marcel, Ian Joyner, Pierre Metras, Joachim Durchholz and others) and removed references to the "Balancing rule" (some may remain.
1 February 2000: Version 4.22-4:
January 9, 2000: Version 4.21-3:
January 6, 2000: Version 4.21-2:
There is no language change in this release, except that I have included (in the semantics rule) the change indicated previously (see the entry on 4.21-0 just below) that guarantees uniqueness of Unique values even across classes. This change raises potential implementation problems so it might be rescinded later on.
Otherwise this is just a cleanup of the attribute chapter.
January 3, 2000: Version 4.21-1:
January 2, 2000: Version 4.21-0:
This version also includes numerous corrections on earlier chapters, courtesy Marcel Satchell's careful reading.
January 2, 2000: Version renumbering for consistency. The last few versions should have been called 4.20-x. They now are. The record (below and in the Talkitover archive) has been corrected. Sorry for any confusion.
December 30, 1999: Version 4.20-3.
I have sneakily added two words at the bottom of page 630 which permit ~a where `a' is an attribute, the agent being of type FUNCTION (there was a reference to a class ATTRIBUTE but I have removed it -- too complicated). This possibility may be removed later, however, if it is found that the implementation hardship is not worth the extra benefit. (This would contradict the Uniform Access principle, but only for one specific language construct.)
December 29, 1999: Version 4.20-2
Changes appendix: Updated to reflect essential changes, including those below.
Agent chapter: many small changes and improvements. Added creation agent example (application of inline agents). Changed feature name: value --> item
Agent chapter: introduced class PREDICATE (see also next entry) with convention that BOOLEAN-returning FUNCTION agents are instances of this class. Very important for work on trusted components (neither space nor time to explain here, but believe me).
Agent chapter and ELKS appendix: completed specification of ROUTINE, PROCEDURE, FUNCTION and PREDICATE. I hope it's close to final. Very close to current ISE version (this is essential: no mechanism should be definitively accepted until there is a working implementation); only major difference is that I have changed `argument-' feature names to `operand-' (have to check this with experts next week). I haven't done anything on class TYPE yet.
ELKS appendix and elsewhere: removed class GENERAL. ANY is the sole common ancestor of everything.
ELKS appendix: Added feature `twin' in ANY. Same effect as `clone' (and, like `clone', frozen), but works on target.
ELKS appendix: Changed terminology for `equal', `clone', `copy' and `twin' variants: `identical' instead of `standard_is_equal', `identical_clone' instead of `standard_clone' etc. In actual libraries the old ones should of course be kept as obsolete.
ELKS appendix and elsewhere: INTEGER, REAL types.
ELKS appendix: Removed BIT types. See boolean operations on integers.
Expression chapter: Defined the notion of type of an expression (wasn't there before!). Please read that section (currently 26.21 -- number will almost certainly change).
Type chapter and conformance chapter: Anchoring to formal generics and tuples now officially supported.
Expression chapter: String semantics: notion of `once' string, section (currently) 26.18. See Talkitover message explaining this in detail.
Conformance chapter: chapter complete. See in particular the new notion of Class_type_reference, conformance for multiply constrained generics etc. (Note: multiple constraints have not been implemented yet.)
Genericity chapter: Chapter complete. Many new definitions. Current type, etc.
December 17, 1999: Version 4.20-0.
December 12, 1999: Version 4.17-1.
December 4, 1999: Version 4.17-0.
November 5, 1999: Version 4.16-4. Changed creation expression syntax again in creation chapter. This is basically to undo the previous change (September 2) after some people convinced me it was a bad idea. So the previous syntax with the create keyword is back. I may have forgotten to update some of the examples; if you notice any please tell me. Also did some minor cleanup on the rest of the chapter.
November 3, 1999: Version 4.16-3.
November 3, 1999: Version 4.16-2.
November 1, 1999: Version 4.16-1.
October 31, 1999: Version 4.16-0.
Updated changes appendix to reflect language update.
October 23, 1999: Version 4.15-1.
October 22, 1999: Version 4.15-0.
Updated changes appendix to reflect language update.
October 17, 1999: Version 4.14-5.
October 10, 1999: Version 4.14-4.
October 9, 1999
October 9, 1999
October 8, 1999
October 8, 1999
October 5, 1999
Cleaned up the externals chapter by fixing all cross-references ... and then messed it up again by adding at the end the text of the online CECIL documentation from the ISE Web pages. I had to do that because the CECIL text in the book, straight out of the first edition, was woefully out of date. The text I added is just the plain de-htmlized form of the online manual; in the next few days I will clean it up and merge it with the rest of the chapter. So much for previously announced plans to which, however, I will return as soon as this tedious but necessary task has been completed.
October 3, 1999
September 26, 1999
Updated changes appendix to reflect language update.
September 5, 1999
Updated changes appendix to reflect language update.
September 3, 1999
September 2, 1999
August 31, 1999
August 30, 1999
August 14, 1999
Updated changes appendix to reflect language update.
July 25, 1999
Updated changes appendix to reflect language update.
July 18, 1999
July 18, 1999
July 17, 1999
July 17, 1999
July 16, 1999
Significant updates to changes appendix.
July 16, 1999
(See also Full table of contents.)
EIFFEL: THE LANGUAGE, THIRD EDITION Note: this section used to include links to individual chapters. With the growth of the text, regenerating them has become a time-consuming process because they hit limitations of text processing tools. For the moment only the full text is available. Note its size (over 13 MB). Sorry for the inconvenience. Click here for the full text. |
|