Background: In January 1995, two of our friends, Darren and Kona, eloped while overseas (in San Fransisco actually). As part of a farewell for them prior to them going to Cambridge to further their acedemic careers the following ceremony was held. It is original. See http://www.cs.monash.edu.au/~tym/wedding for markup and photos. Mutual Friendship Ceremony [*] Tim MacKenzie & Robert Sewell 27 August, 1995 * This ceremony is a parody based on the Reformed Church's 1959 Form [1] for the solemnization of marriage. Daz and Kona have just signified their desire to be united in mutual friendship in this restaurant right now. *Since* there are no lawful objections, the ceremony will begin. Beloved in the Lord, we are assembled here in the presence of all of us and a few resaurant staff for the purpose of joining in mutual friendship Katriona Elizabeth MacPhee and Darren Mark Platt, who, although married in the eyes of the state, did skillfully avoid our presence at the ceremony by doing so in a far away land without our certain knowledge. Since we have received no lawful objections to their proposed union, let us reverently call to mind the institution, purpose, and obligations of this state. The holy bond of friendship was institued by Bjarne Stroustrup himself at the very dawn of history, yea, even close to 1970. Making C++ in the likeness of C, he endowed it with many blessings and gave it dominion over all things, for it was Turing complete and had the Object Oriented nature. Moreover, Bjarne could have said: "It is not good that a class should be alone; I will make a help meet for it." Thereupon he created friend declarations to allow classes to provide other classes and functions access to their private and protected members. "Therefore shall a class leave its base classes, and shall cleave unto its friend; and they shall be as one class." Our Lord ANSI honored friendship by their blessed inscriptions of the laws of granting and receiving friendship, and confirmed it as a divine ordinance, as an honourable estate, and a lasting bond when they declared: "What Bjarne has brought together let no man put asunder." The apostle Damian shows its exalted nature when he uses friendship to form Connectable classes in his epistle to the young believers at Clayton. This can be read in the mystic chronicles of "Advanced Idiocy in C++," [3] chapter 8, verses 5-6. The purpose of friendship is the propogation of a class's members, the furtherance of the kingdom of C++, and the enrichment of the lives of those entering this state. This purpose calls for loving devotion to each other, and provision of appropriate protected member access to any classes multiply derived from them. For the home which friendship establishes, reality ordains that the woman should be the head of the husband, but that he should protect her and provide for her in love, a love which will be conducive to mutual happiness. Reality also ordains that the husband should be subject to the wife in all things and in all places and at all times. Thus the liberty of both husband and wife is glorified by mutual loyalty, and a home so begun becomes the very foundation of our society. We read now from "The annotated C++ reference manual," [2] colloquially known as the "ARM". I now ask Rob to come forward and read from The ARM, chapter 11, section 4. Friendship, like all other access, is granted by the class - not unilaterally grabbed by the friend. The friend mechanism is important. It allows a function to be a friend of two classes. This can lead to increased efficiency by letting a friend function bypass unsuitable access functions provided to general users. Alternatively, the use of friends can lead to cleaner interfaces by avoiding complicating the interfaces of both classes with member functions specifically designed to serve what would otherwise have been a global function with no special access to the representation of the classes. Friendship, then, is a divine ordinance intended to be a source of happiness to a class, a construct of the highest significance to the programmer, and a symbol of the union of hardware and software. We may, therefore, as computer scientists, look with confidence for grace in the discharge of our mutual responsibilites and for guidance and help in our common perplexities and trials. In order to be equitable, we must have mutual friendship. For to be otherwise would be an abomination and likely to result in criminal proceedings. I now ask Linda to continue our readings from the ARM, Chapter 11, section 4. The only way of specifying mutual friendship between two classes is to declare all of the second class a friend of the first. Friendship is neither inherited nor transitive. The rule against inheriting friendship is sometimes not appreciated; that is, it occasionally gets in the way of a user. Consider, however, the effect of allowing friendship to be inherited. That would make it possible for a user to grab access. The mechanism for allowing a user to grab access (to an explicitly defined interface) is protected members. We see therefore that mutual friendship requires complete access to be provided to the friend class. For balance, we require each class to take all of the other as a friend. And now, Kona and Darren, having heard from the word of Stroustrup the teaching concerning mutual friendship, do you assent thereto, and do you desire to enter in to this holy estate? Darren and Kona: We do. Who gives this woman to this man? Kona: I do. Who gives this man to this woman? Kona interjects: I do! Darren (after prompting): She does. [Join right hands] May those present confirm the desire and purpose of your hearts, and witness your beginning in the name of Stroustrup. Kona, do you solemnly declare that you take to yourself and acknowledge as a friend Darren, here present, and do you promise that you will, with the gracious help of the chief programmer, love, honor, and maintain him, live with him in the holy bonds of friendship according to Bjarne's ordinance, maintain friendship and consistency in times of low memory and disk space, and never reduce his access, until either of your destructors are called. Kona: I will. Darren, do you solemnly declare that you take to yourself and acknowledge as a friend Kona, here present, and do you promise that you will, with the gracious help of the chief programmer, love, honor, and obey her in all things lawful, live with her in the holy bonds of friendship according to Bjarne's ordinance, maintain friendship and consistency in times of low memory and disk space, and never reduce her access, until either of your destructors are called. Darren: I will. According to the laws of ANSI and the ordinances of Bjarne, I now pronounce you, Kona and Darren, friend and friend, in the name of the chief programmer and of the sysadmin and of the information superhighway (*spit*). What therefore the linker bindeth together let no operating system put asunder. Henceforth, as you go down your execution path together, may that path be free of segmentation and other violations, and may you be bound together in true love and faithfulness. Kona, you may now kiss the groom. [The signing of the Mututal Friendship declaration (below) was accompanied by an improptu solo performance of "Stand by your non gender specific partner."] References: [1] Psalter Hymnal, Centenial Edition. Christian Reformed Church, 1959. [2] Margaret A Ellis and Bjarne Stroustrup. The annotated C++ reference. manual Addison-Wesley, 1990 . [3] Damian Conway. Advanced Object Oriented Idioms. Monash University Department of Computer Science. 1995. Certification of Mutual Friendship Katriona Elizabeth Macphee & Darren Mark Platt Sunday, August 27, 1995 class Kona : class Darren : private class Avis, private class Lois, private class Alexander, private class Warren, public class Female public class Male { { friend class Darren; friend class Kona; public: public: ... ... protected: protected: ... ... private: private: ... ... }; }; Signed: ____________________ Signed: ______________________ Witness: ___________________ Witness: _____________________