CS253: Software Development with C++

Spring 2022, self-assignment.

Colorado State University logo

Show Lecture.Self-assignment as a slide show.

CS253 Self-assignment

what is self assignment in c

This illustrates the danger of self-assignment.

That is, when an object containing pointers or other handles to external resources is assigned to itself, you’ve got to be careful in operator= , or you might destroy your data before you copy it to yourself.

Copy Constructor General Outline

When a class contains a handle to external data, the copy constructor generally follows this pattern:

  • Copy the resource from the other object to this object.

That is, don’t just copy the handle (pointer, file descriptor, etc.). Instead you have to make an actual copy of the resource (copy the memory from new , create a new temporary file and copy the contents, etc.).

Of course, this is a copy constructor, not an assignment operator, so there was no previous value. We are constructing .

Assignment Operator General Outline

When a class contains a handle to external data, the assignment operator ( operator= ) generally follows this pattern:

  • Get rid of the old external data ( delete memory, close network socket, delete temporary file, unlock semaphore, etc.).
  • This is a silly class that stores a float in dynamic memory.
  • It works—so far.

Try Copy Constructor

  • That failed because the default copy ctor just copied the pointer.
  • Both objects’ dtors tried to free the same pointer … boom!
  • We deserve that, because we didn’t follow the general outline for a copy constructor. We got the default copy ctor.

Fixed Copy Constructor

  • The new copy ctor allocated more space and copied the data, not just the pointer.

Try Assignment Operator

  • The default assignment operator has the same problem.
  • Also, relying upon the compiler-created operator= when you've written the copy ctor is deprecated.

Fix Assignment Operator

  • The assignment operator now allocates space & copies the data.
  • Whaaaaaaaaaat?

Explanation

What happens inside a = a ?

  • First, delete the old data.
  • Second, copy the new data (that we just freed).
  • We must copy the data, but, sometimes, we can’t  !
  • If this is self-assignment, don’t do anything.
  • How to detect that?
  • See if the address of the left-hand-side ( this ) equals the address of the right-hand-side ( &rhs ).
  • The & in the declaration const HeapFloat &rhs means “reference to”, whereas the & in the expression   this != &rhs means ”address of”.

This Sounds Silly

  • Yeah, but, … so what? Nobody will ever really do that.
  • Not explicitly, no. But it might happen indirectly.
  • Find the smallest element.
  • Swap it with the first element.
  • What if the first element is the smallest element?
  • You’ll try to assign [0] to [0] ! Self-assignment!

Not very DRY

  • new float (*rhs.data) appears twice— WET !

The copy ctor calls operator= ; as complex objects often do. Initialize data = nullptr so the initial delete data is ok.

  • Sign In / Suggest an Article

Current ISO C++ status

Upcoming ISO C++ meetings

Upcoming C++ conferences

Compiler conformance status

ISO C++ committee meeting

March 18-23, Tokyo, Japan

April 17-20, Bristol, UK

using std::cpp 2024

April 24-26, Leganes, Spain

Pure Virtual C++ 2024

April 30, Online  

C++ Now 2024

May 7-12, Aspen, CO, USA

June 24-29, St. Louis, MO, USA

July 2-5, Folkestone, Kent, UK

assignment operators

Assignment operators, what is “self assignment”.

Self assignment is when someone assigns an object to itself. For example,

Obviously no one ever explicitly does a self assignment like the above, but since more than one pointer or reference can point to the same object (aliasing), it is possible to have self assignment without knowing it:

This is only valid for copy assignment. Self-assignment is not valid for move assignment.

Why should I worry about “self assignment”?

If you don’t worry about self assignment , you’ll expose your users to some very subtle bugs that have very subtle and often disastrous symptoms. For example, the following class will cause a complete disaster in the case of self-assignment:

If someone assigns a Fred object to itself, line #1 deletes both this->p_ and f.p_ since *this and f are the same object. But line #2 uses *f.p_ , which is no longer a valid object. This will likely cause a major disaster.

The bottom line is that you the author of class Fred are responsible to make sure self-assignment on a Fred object is innocuous . Do not assume that users won’t ever do that to your objects. It is your fault if your object crashes when it gets a self-assignment.

Aside: the above Fred::operator= (const Fred&) has a second problem: If an exception is thrown while evaluating new Wilma(*f.p_) (e.g., an out-of-memory exception or an exception in Wilma ’s copy constructor ), this->p_ will be a dangling pointer — it will point to memory that is no longer valid. This can be solved by allocating the new objects before deleting the old objects.

Okay, okay, already; I’ll handle self-assignment. How do I do it?

You should worry about self assignment every time you create a class . This does not mean that you need to add extra code to all your classes: as long as your objects gracefully handle self assignment, it doesn’t matter whether you had to add extra code or not.

We will illustrate the two cases using the assignment operator in the previous FAQ :

If self-assignment can be handled without any extra code, don’t add any extra code. But do add a comment so others will know that your assignment operator gracefully handles self-assignment:

Example 1a:

Example 1b:

If you need to add extra code to your assignment operator, here’s a simple and effective technique:

Or equivalently:

By the way: the goal is not to make self-assignment fast. If you don’t need to explicitly test for self-assignment, for example, if your code works correctly (even if slowly) in the case of self-assignment, then do not put an if test in your assignment operator just to make the self-assignment case fast. The reason is simple: self-assignment is almost always rare, so it merely needs to be correct - it does not need to be efficient. Adding the unnecessary if statement would make a rare case faster by adding an extra conditional-branch to the normal case, punishing the many to benefit the few.

In this case, however, you should add a comment at the top of your assignment operator indicating that the rest of the code makes self-assignment is benign, and that is why you didn’t explicitly test for it. That way future maintainers will know to make sure self-assignment stays benign, or if not, they will need to add the if test.

I’m creating a derived class; should my assignment operators call my base class’s assignment operators?

Yes (if you need to define assignment operators in the first place).

If you define your own assignment operators, the compiler will not automatically call your base class’s assignment operators for you. Unless your base class’s assignment operators themselves are broken, you should call them explicitly from your derived class’s assignment operators (again, assuming you create them in the first place).

However if you do not create your own assignment operators, the ones that the compiler create for you will automatically call your base class’s assignment operators.

Please Login to submit a recommendation.

If you don’t have an account, you can register for free.

Next: Execution Control Expressions , Previous: Arithmetic , Up: Top   [ Contents ][ Index ]

7 Assignment Expressions

As a general concept in programming, an assignment is a construct that stores a new value into a place where values can be stored—for instance, in a variable. Such places are called lvalues (see Lvalues ) because they are locations that hold a value.

An assignment in C is an expression because it has a value; we call it an assignment expression . A simple assignment looks like

We say it assigns the value of the expression value-to-store to the location lvalue , or that it stores value-to-store there. You can think of the “l” in “lvalue” as standing for “left,” since that’s what you put on the left side of the assignment operator.

However, that’s not the only way to use an lvalue, and not all lvalues can be assigned to. To use the lvalue in the left side of an assignment, it has to be modifiable . In C, that means it was not declared with the type qualifier const (see const ).

The value of the assignment expression is that of lvalue after the new value is stored in it. This means you can use an assignment inside other expressions. Assignment operators are right-associative so that

is equivalent to

This is the only useful way for them to associate; the other way,

would be invalid since an assignment expression such as x = y is not valid as an lvalue.

Warning: Write parentheses around an assignment if you nest it inside another expression, unless that is a conditional expression, or comma-separated series, or another assignment.

Learn C++

21.12 — Overloading the assignment operator

The copy assignment operator (operator=) is used to copy values from one object to another already existing object .

Related content

As of C++11, C++ also supports “Move assignment”. We discuss move assignment in lesson 22.3 -- Move constructors and move assignment .

Copy assignment vs Copy constructor

The purpose of the copy constructor and the copy assignment operator are almost equivalent -- both copy one object to another. However, the copy constructor initializes new objects, whereas the assignment operator replaces the contents of existing objects.

The difference between the copy constructor and the copy assignment operator causes a lot of confusion for new programmers, but it’s really not all that difficult. Summarizing:

  • If a new object has to be created before the copying can occur, the copy constructor is used (note: this includes passing or returning objects by value).
  • If a new object does not have to be created before the copying can occur, the assignment operator is used.

Overloading the assignment operator

Overloading the copy assignment operator (operator=) is fairly straightforward, with one specific caveat that we’ll get to. The copy assignment operator must be overloaded as a member function.

This prints:

This should all be pretty straightforward by now. Our overloaded operator= returns *this, so that we can chain multiple assignments together:

Issues due to self-assignment

Here’s where things start to get a little more interesting. C++ allows self-assignment:

This will call f1.operator=(f1), and under the simplistic implementation above, all of the members will be assigned to themselves. In this particular example, the self-assignment causes each member to be assigned to itself, which has no overall impact, other than wasting time. In most cases, a self-assignment doesn’t need to do anything at all!

However, in cases where an assignment operator needs to dynamically assign memory, self-assignment can actually be dangerous:

First, run the program as it is. You’ll see that the program prints “Alex” as it should.

Now run the following program:

You’ll probably get garbage output. What happened?

Consider what happens in the overloaded operator= when the implicit object AND the passed in parameter (str) are both variable alex. In this case, m_data is the same as str.m_data. The first thing that happens is that the function checks to see if the implicit object already has a string. If so, it needs to delete it, so we don’t end up with a memory leak. In this case, m_data is allocated, so the function deletes m_data. But because str is the same as *this, the string that we wanted to copy has been deleted and m_data (and str.m_data) are dangling.

Later on, we allocate new memory to m_data (and str.m_data). So when we subsequently copy the data from str.m_data into m_data, we’re copying garbage, because str.m_data was never initialized.

Detecting and handling self-assignment

Fortunately, we can detect when self-assignment occurs. Here’s an updated implementation of our overloaded operator= for the MyString class:

By checking if the address of our implicit object is the same as the address of the object being passed in as a parameter, we can have our assignment operator just return immediately without doing any other work.

Because this is just a pointer comparison, it should be fast, and does not require operator== to be overloaded.

When not to handle self-assignment

Typically the self-assignment check is skipped for copy constructors. Because the object being copy constructed is newly created, the only case where the newly created object can be equal to the object being copied is when you try to initialize a newly defined object with itself:

In such cases, your compiler should warn you that c is an uninitialized variable.

Second, the self-assignment check may be omitted in classes that can naturally handle self-assignment. Consider this Fraction class assignment operator that has a self-assignment guard:

If the self-assignment guard did not exist, this function would still operate correctly during a self-assignment (because all of the operations done by the function can handle self-assignment properly).

Because self-assignment is a rare event, some prominent C++ gurus recommend omitting the self-assignment guard even in classes that would benefit from it. We do not recommend this, as we believe it’s a better practice to code defensively and then selectively optimize later.

The copy and swap idiom

A better way to handle self-assignment issues is via what’s called the copy and swap idiom. There’s a great writeup of how this idiom works on Stack Overflow .

The implicit copy assignment operator

Unlike other operators, the compiler will provide an implicit public copy assignment operator for your class if you do not provide a user-defined one. This assignment operator does memberwise assignment (which is essentially the same as the memberwise initialization that default copy constructors do).

Just like other constructors and operators, you can prevent assignments from being made by making your copy assignment operator private or using the delete keyword:

Note that if your class has const members, the compiler will instead define the implicit operator= as deleted. This is because const members can’t be assigned, so the compiler will assume your class should not be assignable.

If you want a class with const members to be assignable (for all members that aren’t const), you will need to explicitly overload operator= and manually assign each non-const member.

guest

cppreference.com

Assignment operators.

Assignment operators modify the value of the object.

[ edit ] Definitions

Copy assignment replaces the contents of the object a with a copy of the contents of b ( b is not modified). For class types, this is performed in a special member function, described in copy assignment operator .

For non-class types, copy and move assignment are indistinguishable and are referred to as direct assignment .

Compound assignment replace the contents of the object a with the result of a binary operation between the previous value of a and the value of b .

[ edit ] Assignment operator syntax

The assignment expressions have the form

  • ↑ target-expr must have higher precedence than an assignment expression.
  • ↑ new-value cannot be a comma expression, because its precedence is lower.

[ edit ] Built-in simple assignment operator

For the built-in simple assignment, the object referred to by target-expr is modified by replacing its value with the result of new-value . target-expr must be a modifiable lvalue.

The result of a built-in simple assignment is an lvalue of the type of target-expr , referring to target-expr . If target-expr is a bit-field , the result is also a bit-field.

[ edit ] Assignment from an expression

If new-value is an expression, it is implicitly converted to the cv-unqualified type of target-expr . When target-expr is a bit-field that cannot represent the value of the expression, the resulting value of the bit-field is implementation-defined.

If target-expr and new-value identify overlapping objects, the behavior is undefined (unless the overlap is exact and the type is the same).

In overload resolution against user-defined operators , for every type T , the following function signatures participate in overload resolution:

For every enumeration or pointer to member type T , optionally volatile-qualified, the following function signature participates in overload resolution:

For every pair A1 and A2 , where A1 is an arithmetic type (optionally volatile-qualified) and A2 is a promoted arithmetic type, the following function signature participates in overload resolution:

[ edit ] Built-in compound assignment operator

The behavior of every built-in compound-assignment expression target-expr   op   =   new-value is exactly the same as the behavior of the expression target-expr   =   target-expr   op   new-value , except that target-expr is evaluated only once.

The requirements on target-expr and new-value of built-in simple assignment operators also apply. Furthermore:

  • For + = and - = , the type of target-expr must be an arithmetic type or a pointer to a (possibly cv-qualified) completely-defined object type .
  • For all other compound assignment operators, the type of target-expr must be an arithmetic type.

In overload resolution against user-defined operators , for every pair A1 and A2 , where A1 is an arithmetic type (optionally volatile-qualified) and A2 is a promoted arithmetic type, the following function signatures participate in overload resolution:

For every pair I1 and I2 , where I1 is an integral type (optionally volatile-qualified) and I2 is a promoted integral type, the following function signatures participate in overload resolution:

For every optionally cv-qualified object type T , the following function signatures participate in overload resolution:

[ edit ] Example

Possible output:

[ edit ] Defect reports

The following behavior-changing defect reports were applied retroactively to previously published C++ standards.

[ edit ] See also

Operator precedence

Operator overloading

  • Recent changes
  • Offline version
  • What links here
  • Related changes
  • Upload file
  • Special pages
  • Printable version
  • Permanent link
  • Page information
  • In other languages
  • This page was last modified on 25 January 2024, at 22:41.
  • This page has been accessed 410,142 times.
  • Privacy policy
  • About cppreference.com
  • Disclaimers

Powered by MediaWiki

  • Spring Final Exam/Assignment Policy and Self Scheduled Exams
  • Offices, Centers, & Institutes
  • Provost and Dean of the Faculty

Dear Faculty Colleagues,

We are writing about the final exam period, end-of-semester assignments, and self-scheduled exams.

Grade policies

Grading policies are found in Section IV.D of the Faculty Handbook . We include here some relevant sections that were voted into effect by the faculty as a reminder of the current policies (emphasis added):

IV.D.3. Completion of Student Work in Courses Work in all courses, including independents, must be completed by the last day of classes , so that faculty can grade papers and students can study during the review period before exams.

IV.D.4. Cumulative and/or Integrative Assignments/Examinations  It is essential that some substantial component of the work in every class be cumulative and/or integrative in nature. One way this expectation may be fulfilled is by one or more in-class examinations (midterm or midterms) and a two-hour final examination. Alternatives to this model may take many forms, including (but not limited to) take-home exams, reflective essays, individual or group projects, research papers, oral presentations, or multiple, small, in-class examinations.

It is expected that every class, with the exception of senior seminars, will have one and only one major assignment due or exam take place at the time set by the registrar for the final exam . All other coursework must be submitted by 5 p.m. on the last day of classes. The Office of the Associate Deans of the Faculty provides administrative support for self-scheduled exams.

As faculty design their final assignments, they should be mindful of students' final-exam-week workload.

Please keep these policies in mind so that students can prepare appropriately for their end-of-semester work (and, to reiterate what is above, please note that cumulative and/or integrative assignments due during finals week must be due at the time set by the registrar for the final exam).

It is a general rule that a student who has three final examinations scheduled in a single day has a right to request that they be allowed to take one of them at a different time. This is usually accomplished informally with a request to one of the instructors involved. In some cases the student may ask their administrative dean to intervene with the instructor(s), and faculty members are asked to cooperate with such a request. If the problem cannot be resolved in this manner, it will be referred to the dean of academic and curricular affairs, who will determine which of the student’s three examinations will be rescheduled.

Except in the unusual case of a student having three examinations scheduled in a single day, however, students are expected to take the final examinations in their courses at the regularly scheduled times. Students should not make end-of-semester travel plans prior to the publication of the final exam schedule (or should schedule travel for after the end of the final exam period). Faculty members are strongly discouraged from giving “make-up” or special final examinations for students except in very unusual cases and for compelling reasons.

It is requested that faculty members inform a student’s administrative dean if the student fails to appear for a scheduled final examination in a course.

Grades for seniors are due by 9 a.m. on Monday, May 13. Grades for all remaining students are due by 9 a.m. on Tuesday, May 21, by 9 a.m.

Options for final exams

• In-class exam due at the time the registrar dictates

• Take-home exam which references the honor code and code of student conduct, also due at the time the registrar dictates

• Self-scheduled exam , flexible timing throughout the week; faculty must sign up for proctoring time

As noted in a communication before the start of the term, our obligations as instructors extend beyond the last class through finals week, so independent of the exam approach, you should be on campus and accessible to your students until all work is completed.

Faculty who give a traditional final exam may schedule the exam at the time set by the registrar or take advantage of the Academic Honor Code and offer a “take-home” exam due at the time set by the registrar for the final exam.

Another option is to offer a self-scheduled exam using the process described below and on the attached “self-scheduled exam guidelines for faculty.” The decision to allow students to take exams via “take-home” or the self-scheduled exam process is a course-by-course decision made by individual faculty members. Faculty members are not obligated to allow “take-home” or self-scheduling and may choose to offer different approaches for different courses.

Instructions for self-scheduled exams

The Office of the Associate Deans of the Faculty will continue to support centralized administration of self-scheduled exams. Due to recent concerns about academic honesty and exam room protocols, the AAB adopted the following:

While broader honor code issues are being discussed, AAB recommends that we require each faculty member using deans’ office administered self-scheduled exams to sign up for a two-hour slot where they will serve as an exam room proctor. Those faculty who choose to give self-scheduled exams will be asked to identify a slot when they can proctor.

Please see the EXAM TIMES as well as detailed instructions for faculty and students . Note the following procedures, which may be relevant in deciding to use deans’ office self-scheduling:

  • 1. If you would like to give self-scheduled exams this term with help from the deans' office, you must let Cassidy Rodman ([email protected]) know the course numbers, enrollments, and what times you would be available to serve as an exam proctor by Wednesday, May 1 .
  • 2. Faculty should provide the following to Cassidy Rodman in the deans’ office (105 McGregory Hall) no later than 10 a.m. on Wednesday, May 1 :
  • Exams with correct color cover page (see faculty instructions)
  • Blue books for the entire class (if needed)
  • Two class lists (with photos)
  • Cell phone number in case of any issues regarding the exam
  • 3. Students must pick up exams at the Clark Room in J.C. Colgate Hall and will be directed to the Hall of Presidents to take their exam. There will be a monitor in the exam room and students will sign in and out. Exams will be returned to the monitor at the Clark Room. Since faculty are required to serve as proctors if they give a self-scheduled final, there will be a faculty proctor present for most of final exam week. However, as not all faculty give self-scheduled finals, it is likely that there will be times when no faculty proctor is present in the exam room.
  • 4. These procedures are meant to support faculty who offer self-scheduling for all students in a course. We ask that faculty make separate arrangements for cases where individual students are taking make-up exams.
  • 5. Faculty may allow use of calculators in the exam room: no other electronic devices are permitted. Please make this notation clear on the cover sheet accompanying your exams. Faculty will need to make separate arrangements for exams or students where computer or internet access is required.
  • 6. We ask that faculty offering self-scheduled exams make every effort to be in town throughout exam week. Faculty are expected to pick up all final exams by Friday, May 10, at 4 p.m. at the latest. Possible issues concerning exam questions, photocopying mistakes, etc., make it difficult to administer exams for faculty who are out of town, and security concerns prevent us from mailing completed final exams to faculty.

It is important to adhere to these deadlines so that we have time to prepare the appropriate materials. Also, remember to let your division coordinator know if you will not be using your regular final exam room.

Please contact Cassidy Rodman ([email protected]) in the deans’ office if you have questions.

Douglas Johnson, Dean of Academic and Curricular Affairs Danny Barreto, Interim Associate Dean of the Faculty for Global and Local Initiatives Christian DuComb, Associate Dean of the Faculty for Faculty Recruitment and Development

  • C++ Data Types
  • C++ Input/Output
  • C++ Pointers
  • C++ Interview Questions
  • C++ Programs
  • C++ Cheatsheet
  • C++ Projects
  • C++ Exception Handling
  • C++ Memory Management
  • Compound Statements in C++
  • Rethrowing an Exception in C++
  • Variable Shadowing in C++
  • Condition Variables in C++ Multithreading
  • C++23 <print> Header
  • Literals In C++
  • How to Define Constants in C++?
  • C++ Variable Templates
  • Introduction to GUI Programming in C++
  • Concurrency in C++
  • Hybrid Inheritance In C++
  • Dereference Pointer in C
  • shared_ptr in C++
  • Nested Inline Namespaces In C++20
  • C++20 std::basic_syncbuf
  • std::shared_mutex in C++
  • Partial Template Specialization in C++
  • Pass By Reference In C
  • Address Operator & in C

Assignment Operators In C++

In C++, the assignment operator forms the backbone of many algorithms and computational processes by performing a simple operation like assigning a value to a variable. It is denoted by equal sign ( = ) and provides one of the most basic operations in any programming language that is used to assign some value to the variables in C++ or in other words, it is used to store some kind of information.

The right-hand side value will be assigned to the variable on the left-hand side. The variable and the value should be of the same data type.

The value can be a literal or another variable of the same data type.

Compound Assignment Operators

In C++, the assignment operator can be combined into a single operator with some other operators to perform a combination of two operations in one single statement. These operators are called Compound Assignment Operators. There are 10 compound assignment operators in C++:

  • Addition Assignment Operator ( += )
  • Subtraction Assignment Operator ( -= )
  • Multiplication Assignment Operator ( *= )
  • Division Assignment Operator ( /= )
  • Modulus Assignment Operator ( %= )
  • Bitwise AND Assignment Operator ( &= )
  • Bitwise OR Assignment Operator ( |= )
  • Bitwise XOR Assignment Operator ( ^= )
  • Left Shift Assignment Operator ( <<= )
  • Right Shift Assignment Operator ( >>= )

Lets see each of them in detail.

1. Addition Assignment Operator (+=)

In C++, the addition assignment operator (+=) combines the addition operation with the variable assignment allowing you to increment the value of variable by a specified expression in a concise and efficient way.

This above expression is equivalent to the expression:

2. Subtraction Assignment Operator (-=)

The subtraction assignment operator (-=) in C++ enables you to update the value of the variable by subtracting another value from it. This operator is especially useful when you need to perform subtraction and store the result back in the same variable.

3. Multiplication Assignment Operator (*=)

In C++, the multiplication assignment operator (*=) is used to update the value of the variable by multiplying it with another value.

4. Division Assignment Operator (/=)

The division assignment operator divides the variable on the left by the value on the right and assigns the result to the variable on the left.

5. Modulus Assignment Operator (%=)

The modulus assignment operator calculates the remainder when the variable on the left is divided by the value or variable on the right and assigns the result to the variable on the left.

6. Bitwise AND Assignment Operator (&=)

This operator performs a bitwise AND between the variable on the left and the value on the right and assigns the result to the variable on the left.

7. Bitwise OR Assignment Operator (|=)

The bitwise OR assignment operator performs a bitwise OR between the variable on the left and the value or variable on the right and assigns the result to the variable on the left.

8. Bitwise XOR Assignment Operator (^=)

The bitwise XOR assignment operator performs a bitwise XOR between the variable on the left and the value or variable on the right and assigns the result to the variable on the left.

9. Left Shift Assignment Operator (<<=)

The left shift assignment operator shifts the bits of the variable on the left to left by the number of positions specified on the right and assigns the result to the variable on the left.

10. Right Shift Assignment Operator (>>=)

The right shift assignment operator shifts the bits of the variable on the left to the right by a number of positions specified on the right and assigns the result to the variable on the left.

Also, it is important to note that all of the above operators can be overloaded for custom operations with user-defined data types to perform the operations we want.

Please Login to comment...

Similar reads.

  • Geeks Premier League 2023
  • Geeks Premier League
  • CBSE Exam Format Changed for Class 11-12: Focus On Concept Application Questions
  • 10 Best Waze Alternatives in 2024 (Free)
  • 10 Best Squarespace Alternatives in 2024 (Free)
  • Top 10 Owler Alternatives & Competitors in 2024
  • 30 OOPs Interview Questions and Answers (2024)

Improve your Coding Skills with Practice

 alt=

What kind of Experience do you want to share?

photo of Icon of the Seas, taken on a long railed path approaching the stern of the ship, with people walking along dock

Crying Myself to Sleep on the Biggest Cruise Ship Ever

Seven agonizing nights aboard the Icon of the Seas

photo of Icon of the Seas, taken on a long railed path approaching the stern of the ship, with people walking along dock

Listen to this article

Listen to more stories on curio

Updated at 2:44 p.m. ET on April 6, 2024.

This article was featured in the One Story to Read Today newsletter. Sign up for it here .

MY FIRST GLIMPSE of Royal Caribbean’s Icon of the Seas, from the window of an approaching Miami cab, brings on a feeling of vertigo, nausea, amazement, and distress. I shut my eyes in defense, as my brain tells my optic nerve to try again.

The ship makes no sense, vertically or horizontally. It makes no sense on sea, or on land, or in outer space. It looks like a hodgepodge of domes and minarets, tubes and canopies, like Istanbul had it been designed by idiots. Vibrant, oversignifying colors are stacked upon other such colors, decks perched over still more decks; the only comfort is a row of lifeboats ringing its perimeter. There is no imposed order, no cogent thought, and, for those who do not harbor a totalitarian sense of gigantomania, no visual mercy. This is the biggest cruise ship ever built, and I have been tasked with witnessing its inaugural voyage.

Explore the May 2024 Issue

Check out more from this issue and find your next story to read.

“Author embarks on their first cruise-ship voyage” has been a staple of American essay writing for almost three decades, beginning with David Foster Wallace’s “A Supposedly Fun Thing I’ll Never Do Again,” which was first published in 1996 under the title “Shipping Out.” Since then, many admirable writers have widened and diversified the genre. Usually the essayist commissioned to take to the sea is in their first or second flush of youth and is ready to sharpen their wit against the hull of the offending vessel. I am 51, old and tired, having seen much of the world as a former travel journalist, and mostly what I do in both life and prose is shrug while muttering to my imaginary dachshund, “This too shall pass.” But the Icon of the Seas will not countenance a shrug. The Icon of the Seas is the Linda Loman of cruise ships, exclaiming that attention must be paid. And here I am in late January with my one piece of luggage and useless gray winter jacket and passport, zipping through the Port of Miami en route to the gangway that will separate me from the bulk of North America for more than seven days, ready to pay it in full.

The aforementioned gangway opens up directly onto a thriving mall (I will soon learn it is imperiously called the “Royal Promenade”), presently filled with yapping passengers beneath a ceiling studded with balloons ready to drop. Crew members from every part of the global South, as well as a few Balkans, are shepherding us along while pressing flutes of champagne into our hands. By a humming Starbucks, I drink as many of these as I can and prepare to find my cabin. I show my blue Suite Sky SeaPass Card (more on this later, much more) to a smiling woman from the Philippines, and she tells me to go “aft.” Which is where, now? As someone who has rarely sailed on a vessel grander than the Staten Island Ferry, I am confused. It turns out that the aft is the stern of the ship, or, for those of us who don’t know what a stern or an aft are, its ass. The nose of the ship, responsible for separating the waves before it, is also called a bow, and is marked for passengers as the FWD , or forward. The part of the contemporary sailing vessel where the malls are clustered is called the midship. I trust that you have enjoyed this nautical lesson.

I ascend via elevator to my suite on Deck 11. This is where I encounter my first terrible surprise. My suite windows and balcony do not face the ocean. Instead, they look out onto another shopping mall. This mall is the one that’s called Central Park, perhaps in homage to the Olmsted-designed bit of greenery in the middle of my hometown. Although on land I would be delighted to own a suite with Central Park views, here I am deeply depressed. To sail on a ship and not wake up to a vast blue carpet of ocean? Unthinkable.

Allow me a brief preamble here. The story you are reading was commissioned at a moment when most staterooms on the Icon were sold out. In fact, so enthralled by the prospect of this voyage were hard-core mariners that the ship’s entire inventory of guest rooms (the Icon can accommodate up to 7,600 passengers, but its inaugural journey was reduced to 5,000 or so for a less crowded experience) was almost immediately sold out. Hence, this publication was faced with the shocking prospect of paying nearly $19,000 to procure for this solitary passenger an entire suite—not including drinking expenses—all for the privilege of bringing you this article. But the suite in question doesn’t even have a view of the ocean! I sit down hard on my soft bed. Nineteen thousand dollars for this .

selfie photo of man with glasses, in background is swim-up bar with two women facing away

The viewless suite does have its pluses. In addition to all the Malin+Goetz products in my dual bathrooms, I am granted use of a dedicated Suite Deck lounge; access to Coastal Kitchen, a superior restaurant for Suites passengers; complimentary VOOM SM Surf & Stream (“the fastest Internet at Sea”) “for one device per person for the whole cruise duration”; a pair of bathrobes (one of which comes prestained with what looks like a large expectoration by the greenest lizard on Earth); and use of the Grove Suite Sun, an area on Decks 18 and 19 with food and deck chairs reserved exclusively for Suite passengers. I also get reserved seating for a performance of The Wizard of Oz , an ice-skating tribute to the periodic table, and similar provocations. The very color of my Suite Sky SeaPass Card, an oceanic blue as opposed to the cloying royal purple of the standard non-Suite passenger, will soon provoke envy and admiration. But as high as my status may be, there are those on board who have much higher status still, and I will soon learn to bow before them.

In preparation for sailing, I have “priced in,” as they say on Wall Street, the possibility that I may come from a somewhat different monde than many of the other cruisers. Without falling into stereotypes or preconceptions, I prepare myself for a friendly outspokenness on the part of my fellow seafarers that may not comply with modern DEI standards. I believe in meeting people halfway, and so the day before flying down to Miami, I visited what remains of Little Italy to purchase a popular T-shirt that reads DADDY’S LITTLE MEATBALL across the breast in the colors of the Italian flag. My wife recommended that I bring one of my many T-shirts featuring Snoopy and the Peanuts gang, as all Americans love the beagle and his friends. But I naively thought that my meatball T-shirt would be more suitable for conversation-starting. “Oh, and who is your ‘daddy’?” some might ask upon seeing it. “And how long have you been his ‘little meatball’?” And so on.

I put on my meatball T-shirt and head for one of the dining rooms to get a late lunch. In the elevator, I stick out my chest for all to read the funny legend upon it, but soon I realize that despite its burnished tricolor letters, no one takes note. More to the point, no one takes note of me. Despite my attempts at bridge building, the very sight of me (small, ethnic, without a cap bearing the name of a football team) elicits no reaction from other passengers. Most often, they will small-talk over me as if I don’t exist. This brings to mind the travails of David Foster Wallace , who felt so ostracized by his fellow passengers that he retreated to his cabin for much of his voyage. And Wallace was raised primarily in the Midwest and was a much larger, more American-looking meatball than I am. If he couldn’t talk to these people, how will I? What if I leave this ship without making any friends at all, despite my T-shirt? I am a social creature, and the prospect of seven days alone and apart is saddening. Wallace’s stateroom, at least, had a view of the ocean, a kind of cheap eternity.

Worse awaits me in the dining room. This is a large, multichandeliered room where I attended my safety training (I was shown how to put on a flotation vest; it is a very simple procedure). But the maître d’ politely refuses me entry in an English that seems to verge on another language. “I’m sorry, this is only for pendejos ,” he seems to be saying. I push back politely and he repeats himself. Pendejos ? Piranhas? There’s some kind of P-word to which I am not attuned. Meanwhile elderly passengers stream right past, powered by their limbs, walkers, and electric wheelchairs. “It is only pendejo dining today, sir.” “But I have a suite!” I say, already starting to catch on to the ship’s class system. He examines my card again. “But you are not a pendejo ,” he confirms. I am wearing a DADDY’S LITTLE MEATBALL T-shirt, I want to say to him. I am the essence of pendejo .

Eventually, I give up and head to the plebeian buffet on Deck 15, which has an aquatic-styled name I have now forgotten. Before gaining entry to this endless cornucopia of reheated food, one passes a washing station of many sinks and soap dispensers, and perhaps the most intriguing character on the entire ship. He is Mr. Washy Washy—or, according to his name tag, Nielbert of the Philippines—and he is dressed as a taco (on other occasions, I’ll see him dressed as a burger). Mr. Washy Washy performs an eponymous song in spirited, indeed flamboyant English: “Washy, washy, wash your hands, WASHY WASHY!” The dangers of norovirus and COVID on a cruise ship this size (a giant fellow ship was stricken with the former right after my voyage) makes Mr. Washy Washy an essential member of the crew. The problem lies with the food at the end of Washy’s rainbow. The buffet is groaning with what sounds like sophisticated dishes—marinated octopus, boiled egg with anchovy, chorizo, lobster claws—but every animal tastes tragically the same, as if there was only one creature available at the market, a “cruisipus” bred specifically for Royal Caribbean dining. The “vegetables” are no better. I pick up a tomato slice and look right through it. It tastes like cellophane. I sit alone, apart from the couples and parents with gaggles of children, as “We Are Family” echoes across the buffet space.

I may have failed to mention that all this time, the Icon of the Seas has not left port. As the fiery mango of the subtropical setting sun makes Miami’s condo skyline even more apocalyptic, the ship shoves off beneath a perfunctory display of fireworks. After the sun sets, in the far, dark distance, another circus-lit cruise ship ruptures the waves before us. We glance at it with pity, because it is by definition a smaller ship than our own. I am on Deck 15, outside the buffet and overlooking a bunch of pools (the Icon has seven of them), drinking a frilly drink that I got from one of the bars (the Icon has 15 of them), still too shy to speak to anyone, despite Sister Sledge’s assertion that all on the ship are somehow related.

Kim Brooks: On failing the family vacation

The ship’s passage away from Ron DeSantis’s Florida provides no frisson, no sense of developing “sea legs,” as the ship is too large to register the presence of waves unless a mighty wind adds significant chop. It is time for me to register the presence of the 5,000 passengers around me, even if they refuse to register mine. My fellow travelers have prepared for this trip with personally decorated T-shirts celebrating the importance of this voyage. The simplest ones say ICON INAUGURAL ’24 on the back and the family name on the front. Others attest to an over-the-top love of cruise ships: WARNING! MAY START TALKING ABOUT CRUISING . Still others are artisanally designed and celebrate lifetimes spent married while cruising (on ships, of course). A couple possibly in their 90s are wearing shirts whose backs feature a drawing of a cruise liner, two flamingos with ostensibly male and female characteristics, and the legend “ HUSBAND AND WIFE Cruising Partners FOR LIFE WE MAY NOT HAVE IT All Together BUT TOGETHER WE HAVE IT ALL .” (The words not in all caps have been written in cursive.) A real journalist or a more intrepid conversationalist would have gone up to the couple and asked them to explain the longevity of their marriage vis-à-vis their love of cruising. But instead I head to my mall suite, take off my meatball T-shirt, and allow the first tears of the cruise to roll down my cheeks slowly enough that I briefly fall asleep amid the moisture and salt.

photo of elaborate twisting multicolored waterslides with long stairwell to platform

I WAKE UP with a hangover. Oh God. Right. I cannot believe all of that happened last night. A name floats into my cobwebbed, nauseated brain: “Ayn Rand.” Jesus Christ.

I breakfast alone at the Coastal Kitchen. The coffee tastes fine and the eggs came out of a bird. The ship rolls slightly this morning; I can feel it in my thighs and my schlong, the parts of me that are most receptive to danger.

I had a dangerous conversation last night. After the sun set and we were at least 50 miles from shore (most modern cruise ships sail at about 23 miles an hour), I lay in bed softly hiccupping, my arms stretched out exactly like Jesus on the cross, the sound of the distant waves missing from my mall-facing suite, replaced by the hum of air-conditioning and children shouting in Spanish through the vents of my two bathrooms. I decided this passivity was unacceptable. As an immigrant, I feel duty-bound to complete the tasks I am paid for, which means reaching out and trying to understand my fellow cruisers. So I put on a normal James Perse T-shirt and headed for one of the bars on the Royal Promenade—the Schooner Bar, it was called, if memory serves correctly.

I sat at the bar for a martini and two Negronis. An old man with thick, hairy forearms drank next to me, very silent and Hemingwaylike, while a dreadlocked piano player tinkled out a series of excellent Elton John covers. To my right, a young white couple—he in floral shorts, she in a light, summery miniskirt with a fearsome diamond ring, neither of them in football regalia—chatted with an elderly couple. Do it , I commanded myself. Open your mouth. Speak! Speak without being spoken to. Initiate. A sentence fragment caught my ear from the young woman, “Cherry Hill.” This is a suburb of Philadelphia in New Jersey, and I had once been there for a reading at a synagogue. “Excuse me,” I said gently to her. “Did you just mention Cherry Hill? It’s a lovely place.”

As it turned out, the couple now lived in Fort Lauderdale (the number of Floridians on the cruise surprised me, given that Southern Florida is itself a kind of cruise ship, albeit one slowly sinking), but soon they were talking with me exclusively—the man potbellied, with a chin like a hard-boiled egg; the woman as svelte as if she were one of the many Ukrainian members of the crew—the elderly couple next to them forgotten. This felt as groundbreaking as the first time I dared to address an American in his native tongue, as a child on a bus in Queens (“On my foot you are standing, Mister”).

“I don’t want to talk politics,” the man said. “But they’re going to eighty-six Biden and put Michelle in.”

I considered the contradictions of his opening conversational gambit, but decided to play along. “People like Michelle,” I said, testing the waters. The husband sneered, but the wife charitably put forward that the former first lady was “more personable” than Joe Biden. “They’re gonna eighty-six Biden,” the husband repeated. “He can’t put a sentence together.”

After I mentioned that I was a writer—though I presented myself as a writer of teleplays instead of novels and articles such as this one—the husband told me his favorite writer was Ayn Rand. “Ayn Rand, she came here with nothing,” the husband said. “I work with a lot of Cubans, so …” I wondered if I should mention what I usually do to ingratiate myself with Republicans or libertarians: the fact that my finances improved after pass-through corporations were taxed differently under Donald Trump. Instead, I ordered another drink and the couple did the same, and I told him that Rand and I were born in the same city, St. Petersburg/Leningrad, and that my family also came here with nothing. Now the bonding and drinking began in earnest, and several more rounds appeared. Until it all fell apart.

Read: Gary Shteyngart on watching Russian television for five days straight

My new friend, whom I will refer to as Ayn, called out to a buddy of his across the bar, and suddenly a young couple, both covered in tattoos, appeared next to us. “He fucking punked me,” Ayn’s frat-boy-like friend called out as he put his arm around Ayn, while his sizable partner sizzled up to Mrs. Rand. Both of them had a look I have never seen on land—their eyes projecting absence and enmity in equal measure. In the ’90s, I drank with Russian soldiers fresh from Chechnya and wandered the streets of wartime Zagreb, but I have never seen such undisguised hostility toward both me and perhaps the universe at large. I was briefly introduced to this psychopathic pair, but neither of them wanted to have anything to do with me, and the tattooed woman would not even reveal her Christian name to me (she pretended to have the same first name as Mrs. Rand). To impress his tattooed friends, Ayn made fun of the fact that as a television writer, I’d worked on the series Succession (which, it would turn out, practically nobody on the ship had watched), instead of the far more palatable, in his eyes, zombie drama of last year. And then my new friends drifted away from me into an angry private conversation—“He punked me!”—as I ordered another drink for myself, scared of the dead-eyed arrivals whose gaze never registered in the dim wattage of the Schooner Bar, whose terrifying voices and hollow laughs grated like unoiled gears against the crooning of “Goodbye Yellow Brick Road.”

But today is a new day for me and my hangover. After breakfast, I explore the ship’s so-called neighborhoods . There’s the AquaDome, where one can find a food hall and an acrobatic sound-and-light aquatic show. Central Park has a premium steak house, a sushi joint, and a used Rolex that can be bought for $8,000 on land here proudly offered at $17,000. There’s the aforementioned Royal Promenade, where I had drunk with the Rands, and where a pair of dueling pianos duel well into the night. There’s Surfside, a kids’ neighborhood full of sugary garbage, which looks out onto the frothy trail that the behemoth leaves behind itself. Thrill Island refers to the collection of tubes that clutter the ass of the ship and offer passengers six waterslides and a surfing simulation. There’s the Hideaway, an adult zone that plays music from a vomit-slathered, Brit-filled Alicante nightclub circa 1996 and proves a big favorite with groups of young Latin American customers. And, most hurtfully, there’s the Suite Neighborhood.

2 photos: a ship's foamy white wake stretches to the horizon; a man at reailing with water and two large ships docked behind

I say hurtfully because as a Suite passenger I should be here, though my particular suite is far from the others. Whereas I am stuck amid the riffraff of Deck 11, this section is on the highborn Decks 16 and 17, and in passing, I peek into the spacious, tall-ceilinged staterooms from the hallway, dazzled by the glint of the waves and sun. For $75,000, one multifloor suite even comes with its own slide between floors, so that a family may enjoy this particular terror in private. There is a quiet splendor to the Suite Neighborhood. I see fewer stickers and signs and drawings than in my own neighborhood—for example, MIKE AND DIANA PROUDLY SERVED U.S. MARINE CORPS RETIRED . No one here needs to announce their branch of service or rank; they are simply Suites, and this is where they belong. Once again, despite my hard work and perseverance, I have been disallowed from the true American elite. Once again, I am “Not our class, dear.” I am reminded of watching The Love Boat on my grandmother’s Zenith, which either was given to her or we found in the trash (I get our many malfunctioning Zeniths confused) and whose tube got so hot, I would put little chunks of government cheese on a thin tissue atop it to give our welfare treat a pleasant, Reagan-era gooeyness. I could not understand English well enough then to catch the nuances of that seafaring program, but I knew that there were differences in the status of the passengers, and that sometimes those differences made them sad. Still, this ship, this plenty—every few steps, there are complimentary nachos or milkshakes or gyros on offer—was the fatty fuel of my childhood dreams. If only I had remained a child.

I walk around the outdoor decks looking for company. There is a middle-aged African American couple who always seem to be asleep in each other’s arms, probably exhausted from the late capitalism they regularly encounter on land. There is far more diversity on this ship than I expected. Many couples are a testament to Loving v. Virginia , and there is a large group of folks whose T-shirts read MELANIN AT SEA / IT’S THE MELANIN FOR ME . I smile when I see them, but then some young kids from the group makes Mr. Washy Washy do a cruel, caricatured “Burger Dance” (today he is in his burger getup), and I think, Well, so much for intersectionality .

At the infinity pool on Deck 17, I spot some elderly women who could be ethnic and from my part of the world, and so I jump in. I am proved correct! Many of them seem to be originally from Queens (“Corona was still great when it was all Italian”), though they are now spread across the tristate area. We bond over the way “Ron-kon-koma” sounds when announced in Penn Station.

“Everyone is here for a different reason,” one of them tells me. She and her ex-husband last sailed together four years ago to prove to themselves that their marriage was truly over. Her 15-year-old son lost his virginity to “an Irish young lady” while their ship was moored in Ravenna, Italy. The gaggle of old-timers competes to tell me their favorite cruising stories and tips. “A guy proposed in Central Park a couple of years ago”—many Royal Caribbean ships apparently have this ridiculous communal area—“and she ran away screaming!” “If you’re diamond-class, you get four drinks for free.” “A different kind of passenger sails out of Bayonne.” (This, perhaps, is racially coded.) “Sometimes, if you tip the bartender $5, your next drink will be free.”

“Everyone’s here for a different reason,” the woman whose marriage ended on a cruise tells me again. “Some people are here for bad reasons—the drinkers and the gamblers. Some people are here for medical reasons.” I have seen more than a few oxygen tanks and at least one woman clearly undergoing very serious chemo. Some T-shirts celebrate good news about a cancer diagnosis. This might be someone’s last cruise or week on Earth. For these women, who have spent months, if not years, at sea, cruising is a ritual as well as a life cycle: first love, last love, marriage, divorce, death.

Read: The last place on Earth any tourist should go

I have talked with these women for so long, tonight I promise myself that after a sad solitary dinner I will not try to seek out company at the bars in the mall or the adult-themed Hideaway. I have enough material to fulfill my duties to this publication. As I approach my orphaned suite, I run into the aggro young people who stole Mr. and Mrs. Rand away from me the night before. The tattooed apparitions pass me without a glance. She is singing something violent about “Stuttering Stanley” (a character in a popular horror movie, as I discover with my complimentary VOOM SM Surf & Stream Internet at Sea) and he’s loudly shouting about “all the money I’ve lost,” presumably at the casino in the bowels of the ship.

So these bent psychos out of a Cormac McCarthy novel are angrily inhabiting my deck. As I mewl myself to sleep, I envision a limited series for HBO or some other streamer, a kind of low-rent White Lotus , where several aggressive couples conspire to throw a shy intellectual interloper overboard. I type the scenario into my phone. As I fall asleep, I think of what the woman who recently divorced her husband and whose son became a man through the good offices of the Irish Republic told me while I was hoisting myself out of the infinity pool. “I’m here because I’m an explorer. I’m here because I’m trying something new.” What if I allowed myself to believe in her fantasy?

2 photos: 2 slices of pizza on plate; man in "Daddy's Little Meatball" shirt and shorts standing in outdoor dining area with ship's exhaust stacks in background

“YOU REALLY STARTED AT THE TOP,” they tell me. I’m at the Coastal Kitchen for my eggs and corned-beef hash, and the maître d’ has slotted me in between two couples. Fueled by coffee or perhaps intrigued by my relative youth, they strike up a conversation with me. As always, people are shocked that this is my first cruise. They contrast the Icon favorably with all the preceding liners in the Royal Caribbean fleet, usually commenting on the efficiency of the elevators that hurl us from deck to deck (as in many large corporate buildings, the elevators ask you to choose a floor and then direct you to one of many lifts). The couple to my right, from Palo Alto—he refers to his “porn mustache” and calls his wife “my cougar” because she is two years older—tell me they are “Pandemic Pinnacles.”

This is the day that my eyes will be opened. Pinnacles , it is explained to me over translucent cantaloupe, have sailed with Royal Caribbean for 700 ungodly nights. Pandemic Pinnacles took advantage of the two-for-one accrual rate of Pinnacle points during the pandemic, when sailing on a cruise ship was even more ill-advised, to catapult themselves into Pinnacle status.

Because of the importance of the inaugural voyage of the world’s largest cruise liner, more than 200 Pinnacles are on this ship, a startling number, it seems. Mrs. Palo Alto takes out a golden badge that I have seen affixed over many a breast, which reads CROWN AND ANCHOR SOCIETY along with her name. This is the coveted badge of the Pinnacle. “You should hear all the whining in Guest Services,” her husband tells me. Apparently, the Pinnacles who are not also Suites like us are all trying to use their status to get into Coastal Kitchen, our elite restaurant. Even a Pinnacle needs to be a Suite to access this level of corned-beef hash.

“We’re just baby Pinnacles,” Mrs. Palo Alto tells me, describing a kind of internal class struggle among the Pinnacle elite for ever higher status.

And now I understand what the maître d’ was saying to me on the first day of my cruise. He wasn’t saying “ pendejo .” He was saying “Pinnacle.” The dining room was for Pinnacles only, all those older people rolling in like the tide on their motorized scooters.

And now I understand something else: This whole thing is a cult. And like most cults, it can’t help but mirror the endless American fight for status. Like Keith Raniere’s NXIVM, where different-colored sashes were given out to connote rank among Raniere’s branded acolytes, this is an endless competition among Pinnacles, Suites, Diamond-Plusers, and facing-the-mall, no-balcony purple SeaPass Card peasants, not to mention the many distinctions within each category. The more you cruise, the higher your status. No wonder a section of the Royal Promenade is devoted to getting passengers to book their next cruise during the one they should be enjoying now. No wonder desperate Royal Caribbean offers (“FINAL HOURS”) crowded my email account weeks before I set sail. No wonder the ship’s jewelry store, the Royal Bling, is selling a $100,000 golden chalice that will entitle its owner to drink free on Royal Caribbean cruises for life. (One passenger was already gaming out whether her 28-year-old son was young enough to “just about earn out” on the chalice or if that ship had sailed.) No wonder this ship was sold out months before departure , and we had to pay $19,000 for a horrid suite away from the Suite Neighborhood. No wonder the most mythical hero of Royal Caribbean lore is someone named Super Mario, who has cruised so often, he now has his own working desk on many ships. This whole experience is part cult, part nautical pyramid scheme.

From the June 2014 issue: Ship of wonks

“The toilets are amazing,” the Palo Altos are telling me. “One flush and you’re done.” “They don’t understand how energy-efficient these ships are,” the husband of the other couple is telling me. “They got the LNG”—liquefied natural gas, which is supposed to make the Icon a boon to the environment (a concept widely disputed and sometimes ridiculed by environmentalists).

But I’m thinking along a different line of attack as I spear my last pallid slice of melon. For my streaming limited series, a Pinnacle would have to get killed by either an outright peasant or a Suite without an ocean view. I tell my breakfast companions my idea.

“Oh, for sure a Pinnacle would have to be killed,” Mr. Palo Alto, the Pandemic Pinnacle, says, touching his porn mustache thoughtfully as his wife nods.

“THAT’S RIGHT, IT’S your time, buddy!” Hubert, my fun-loving Panamanian cabin attendant, shouts as I step out of my suite in a robe. “Take it easy, buddy!”

I have come up with a new dressing strategy. Instead of trying to impress with my choice of T-shirts, I have decided to start wearing a robe, as one does at a resort property on land, with a proper spa and hammam. The response among my fellow cruisers has been ecstatic. “Look at you in the robe!” Mr. Rand cries out as we pass each other by the Thrill Island aqua park. “You’re living the cruise life! You know, you really drank me under the table that night.” I laugh as we part ways, but my soul cries out, Please spend more time with me, Mr. and Mrs. Rand; I so need the company .

In my white robe, I am a stately presence, a refugee from a better limited series, a one-man crossover episode. (Only Suites are granted these robes to begin with.) Today, I will try many of the activities these ships have on offer to provide their clientele with a sense of never-ceasing motion. Because I am already at Thrill Island, I decide to climb the staircase to what looks like a mast on an old-fashioned ship (terrified, because I am afraid of heights) to try a ride called “Storm Chasers,” which is part of the “Category 6” water park, named in honor of one of the storms that may someday do away with the Port of Miami entirely. Storm Chasers consists of falling from the “mast” down a long, twisting neon tube filled with water, like being the camera inside your own colonoscopy, as you hold on to the handles of a mat, hoping not to die. The tube then flops you down headfirst into a trough of water, a Royal Caribbean baptism. It both knocks my breath out and makes me sad.

In keeping with the aquatic theme, I attend a show at the AquaDome. To the sound of “Live and Let Die,” a man in a harness gyrates to and fro in the sultry air. I saw something very similar in the back rooms of the famed Berghain club in early-aughts Berlin. Soon another harnessed man is gyrating next to the first. Ja , I think to myself, I know how this ends. Now will come the fisting , natürlich . But the show soon devolves into the usual Marvel-film-grade nonsense, with too much light and sound signifying nichts . If any fisting is happening, it is probably in the Suite Neighborhood, inside a cabin marked with an upside-down pineapple, which I understand means a couple are ready to swing, and I will see none of it.

I go to the ice show, which is a kind of homage—if that’s possible—to the periodic table, done with the style and pomp and masterful precision that would please the likes of Kim Jong Un, if only he could afford Royal Caribbean talent. At one point, the dancers skate to the theme song of Succession . “See that!” I want to say to my fellow Suites—at “cultural” events, we have a special section reserved for us away from the commoners—“ Succession ! It’s even better than the zombie show! Open your minds!”

Finally, I visit a comedy revue in an enormous and too brightly lit version of an “intimate,” per Royal Caribbean literature, “Manhattan comedy club.” Many of the jokes are about the cruising life. “I’ve lived on ships for 20 years,” one of the middle-aged comedians says. “I can only see so many Filipino homosexuals dressed as a taco.” He pauses while the audience laughs. “I am so fired tonight,” he says. He segues into a Trump impression and then Biden falling asleep at the microphone, which gets the most laughs. “Anyone here from Fort Leonard Wood?” another comedian asks. Half the crowd seems to cheer. As I fall asleep that night, I realize another connection I have failed to make, and one that may explain some of the diversity on this vessel—many of its passengers have served in the military.

As a coddled passenger with a suite, I feel like I am starting to understand what it means to have a rank and be constantly reminded of it. There are many espresso makers , I think as I look across the expanse of my officer-grade quarters before closing my eyes, but this one is mine .

photo of sheltered sandy beach with palms, umbrellas, and chairs with two large docked cruise ships in background

A shocking sight greets me beyond the pools of Deck 17 as I saunter over to the Coastal Kitchen for my morning intake of slightly sour Americanos. A tiny city beneath a series of perfectly pressed green mountains. Land! We have docked for a brief respite in Basseterre, the capital of St. Kitts and Nevis. I wolf down my egg scramble to be one of the first passengers off the ship. Once past the gangway, I barely refrain from kissing the ground. I rush into the sights and sounds of this scruffy island city, sampling incredible conch curry and buckets of non-Starbucks coffee. How wonderful it is to be where God intended humans to be: on land. After all, I am neither a fish nor a mall rat. This is my natural environment. Basseterre may not be Havana, but there are signs of human ingenuity and desire everywhere you look. The Black Table Grill Has been Relocated to Soho Village, Market Street, Directly Behind of, Gary’s Fruits and Flower Shop. Signed. THE PORK MAN reads a sign stuck to a wall. Now, that is how you write a sign. A real sign, not the come-ons for overpriced Rolexes that blink across the screens of the Royal Promenade.

“Hey, tie your shoestring!” a pair of laughing ladies shout to me across the street.

“Thank you!” I shout back. Shoestring! “Thank you very much.”

A man in Independence Square Park comes by and asks if I want to play with his monkey. I haven’t heard that pickup line since the Penn Station of the 1980s. But then he pulls a real monkey out of a bag. The monkey is wearing a diaper and looks insane. Wonderful , I think, just wonderful! There is so much life here. I email my editor asking if I can remain on St. Kitts and allow the Icon to sail off into the horizon without me. I have even priced a flight home at less than $300, and I have enough material from the first four days on the cruise to write the entire story. “It would be funny …” my editor replies. “Now get on the boat.”

As I slink back to the ship after my brief jailbreak, the locals stand under umbrellas to gaze at and photograph the boat that towers over their small capital city. The limousines of the prime minister and his lackeys are parked beside the gangway. St. Kitts, I’ve been told, is one of the few islands that would allow a ship of this size to dock.

“We hear about all the waterslides,” a sweet young server in one of the cafés told me. “We wish we could go on the ship, but we have to work.”

“I want to stay on your island,” I replied. “I love it here.”

But she didn’t understand how I could possibly mean that.

“WASHY, WASHY, so you don’t get stinky, stinky!” kids are singing outside the AquaDome, while their adult minders look on in disapproval, perhaps worried that Mr. Washy Washy is grooming them into a life of gayness. I heard a southern couple skip the buffet entirely out of fear of Mr. Washy Washy.

Meanwhile, I have found a new watering hole for myself, the Swim & Tonic, the biggest swim-up bar on any cruise ship in the world. Drinking next to full-size, nearly naked Americans takes away one’s own self-consciousness. The men have curvaceous mom bodies. The women are equally un-shy about their sprawling physiques.

Today I’ve befriended a bald man with many children who tells me that all of the little trinkets that Royal Caribbean has left us in our staterooms and suites are worth a fortune on eBay. “Eighty dollars for the water bottle, 60 for the lanyard,” the man says. “This is a cult.”

“Tell me about it,” I say. There is, however, a clientele for whom this cruise makes perfect sense. For a large middle-class family (he works in “supply chains”), seven days in a lower-tier cabin—which starts at $1,800 a person—allow the parents to drop off their children in Surfside, where I imagine many young Filipina crew members will take care of them, while the parents are free to get drunk at a swim-up bar and maybe even get intimate in their cabin. Cruise ships have become, for a certain kind of hardworking family, a form of subsidized child care.

There is another man I would like to befriend at the Swim & Tonic, a tall, bald fellow who is perpetually inebriated and who wears a necklace studded with little rubber duckies in sunglasses, which, I am told, is a sort of secret handshake for cruise aficionados. Tomorrow, I will spend more time with him, but first the ship docks at St. Thomas, in the U.S. Virgin Islands. Charlotte Amalie, the capital, is more charming in name than in presence, but I still all but jump off the ship to score a juicy oxtail and plantains at the well-known Petite Pump Room, overlooking the harbor. From one of the highest points in the small city, the Icon of the Seas appears bigger than the surrounding hills.

I usually tan very evenly, but something about the discombobulation of life at sea makes me forget the regular application of sunscreen. As I walk down the streets of Charlotte Amalie in my fluorescent Icon of the Seas cap, an old Rastafarian stares me down. “Redneck,” he hisses.

“No,” I want to tell him, as I bring a hand up to my red neck, “that’s not who I am at all. On my island, Mannahatta, as Whitman would have it, I am an interesting person living within an engaging artistic milieu. I do not wish to use the Caribbean as a dumping ground for the cruise-ship industry. I love the work of Derek Walcott. You don’t understand. I am not a redneck. And if I am, they did this to me.” They meaning Royal Caribbean? Its passengers? The Rands?

“They did this to me!”

Back on the Icon, some older matrons are muttering about a run-in with passengers from the Celebrity cruise ship docked next to us, the Celebrity Apex. Although Celebrity Cruises is also owned by Royal Caribbean, I am made to understand that there is a deep fratricidal beef between passengers of the two lines. “We met a woman from the Apex,” one matron says, “and she says it was a small ship and there was nothing to do. Her face was as tight as a 19-year-old’s, she had so much surgery.” With those words, and beneath a cloudy sky, humidity shrouding our weathered faces and red necks, we set sail once again, hopefully in the direction of home.

photo from inside of spacious geodesic-style glass dome facing ocean, with stairwells and seating areas

THERE ARE BARELY 48 HOURS LEFT to the cruise, and the Icon of the Seas’ passengers are salty. They know how to work the elevators. They know the Washy Washy song by heart. They understand that the chicken gyro at “Feta Mediterranean,” in the AquaDome Market, is the least problematic form of chicken on the ship.

The passengers have shed their INAUGURAL CRUISE T-shirts and are now starting to evince political opinions. There are caps pledging to make America great again and T-shirts that celebrate words sometimes attributed to Patrick Henry: “The Constitution is not an instrument for the government to restrain the people; it is an instrument for the people to restrain the government.” With their preponderance of FAMILY FLAG FAITH FRIENDS FIREARMS T-shirts, the tables by the crepe station sometimes resemble the Capitol Rotunda on January 6. The Real Anthony Fauci , by Robert F. Kennedy Jr., appears to be a popular form of literature, especially among young men with very complicated versions of the American flag on their T-shirts. Other opinions blend the personal and the political. “Someone needs to kill Washy guy, right?” a well-dressed man in the elevator tells me, his gray eyes radiating nothing. “Just beat him to death. Am I right?” I overhear the male member of a young couple whisper, “There goes that freak” as I saunter by in my white spa robe, and I decide to retire it for the rest of the cruise.

I visit the Royal Bling to see up close the $100,000 golden chalice that entitles you to free drinks on Royal Caribbean forever. The pleasant Serbian saleslady explains that the chalice is actually gold-plated and covered in white zirconia instead of diamonds, as it would otherwise cost $1 million. “If you already have everything,” she explains, “this is one more thing you can get.”

I believe that anyone who works for Royal Caribbean should be entitled to immediate American citizenship. They already speak English better than most of the passengers and, per the Serbian lady’s sales pitch above, better understand what America is as well. Crew members like my Panamanian cabin attendant seem to work 24 hours a day. A waiter from New Delhi tells me that his contract is six months and three weeks long. After a cruise ends, he says, “in a few hours, we start again for the next cruise.” At the end of the half a year at sea, he is allowed a two-to-three-month stay at home with his family. As of 2019, the median income for crew members was somewhere in the vicinity of $20,000, according to a major business publication. Royal Caribbean would not share the current median salary for its crew members, but I am certain that it amounts to a fraction of the cost of a Royal Bling gold-plated, zirconia-studded chalice.

And because most of the Icon’s hyper-sanitized spaces are just a frittata away from being a Delta lounge, one forgets that there are actual sailors on this ship, charged with the herculean task of docking it in port. “Having driven 100,000-ton aircraft carriers throughout my career,” retired Admiral James G. Stavridis, the former NATO Supreme Allied Commander Europe, writes to me, “I’m not sure I would even know where to begin with trying to control a sea monster like this one nearly three times the size.” (I first met Stavridis while touring Army bases in Germany more than a decade ago.)

Today, I decide to head to the hot tub near Swim & Tonic, where some of the ship’s drunkest reprobates seem to gather (the other tubs are filled with families and couples). The talk here, like everywhere else on the ship, concerns football, a sport about which I know nothing. It is apparent that four teams have recently competed in some kind of finals for the year, and that two of them will now face off in the championship. Often when people on the Icon speak, I will try to repeat the last thing they said with a laugh or a nod of disbelief. “Yes, 20-yard line! Ha!” “Oh my God, of course, scrimmage.”

Soon we are joined in the hot tub by the late-middle-age drunk guy with the duck necklace. He is wearing a bucket hat with the legend HAWKEYES , which, I soon gather, is yet another football team. “All right, who turned me in?” Duck Necklace says as he plops into the tub beside us. “I get a call in the morning,” he says. “It’s security. Can you come down to the dining room by 10 a.m.? You need to stay away from the members of this religious family.” Apparently, the gregarious Duck Necklace had photobombed the wrong people. There are several families who present as evangelical Christians or practicing Muslims on the ship. One man, evidently, was not happy that Duck Necklace had made contact with his relatives. “It’s because of religious stuff; he was offended. I put my arm around 20 people a day.”

Everyone laughs. “They asked me three times if I needed medication,” he says of the security people who apparently interrogated him in full view of others having breakfast.

Another hot-tub denizen suggests that he should have asked for fentanyl. After a few more drinks, Duck Necklace begins to muse about what it would be like to fall off the ship. “I’m 62 and I’m ready to go,” he says. “I just don’t want a shark to eat me. I’m a huge God guy. I’m a Bible guy. There’s some Mayan theory squaring science stuff with religion. There is so much more to life on Earth.” We all nod into our Red Stripes.

“I never get off the ship when we dock,” he says. He tells us he lost $6,000 in the casino the other day. Later, I look him up, and it appears that on land, he’s a financial adviser in a crisp gray suit, probably a pillar of his North Chicago community.

photo of author smiling and holding soft-serve ice-cream cone with outdoor seating area in background

THE OCEAN IS TEEMING with fascinating life, but on the surface it has little to teach us. The waves come and go. The horizon remains ever far away.

I am constantly told by my fellow passengers that “everybody here has a story.” Yes, I want to reply, but everybody everywhere has a story. You, the reader of this essay, have a story, and yet you’re not inclined to jump on a cruise ship and, like Duck Necklace, tell your story to others at great pitch and volume. Maybe what they’re saying is that everybody on this ship wants to have a bigger, more coherent, more interesting story than the one they’ve been given. Maybe that’s why there’s so much signage on the doors around me attesting to marriages spent on the sea. Maybe that’s why the Royal Caribbean newsletter slipped under my door tells me that “this isn’t a vacation day spent—it’s bragging rights earned.” Maybe that’s why I’m so lonely.

Today is a big day for Icon passengers. Today the ship docks at Royal Caribbean’s own Bahamian island, the Perfect Day at CocoCay. (This appears to be the actual name of the island.) A comedian at the nightclub opined on what his perfect day at CocoCay would look like—receiving oral sex while learning that his ex-wife had been killed in a car crash (big laughter). But the reality of the island is far less humorous than that.

One of the ethnic tristate ladies in the infinity pool told me that she loved CocoCay because it had exactly the same things that could be found on the ship itself. This proves to be correct. It is like the Icon, but with sand. The same tired burgers, the same colorful tubes conveying children and water from Point A to B. The same swim-up bar at its Hideaway ($140 for admittance, no children allowed; Royal Caribbean must be printing money off its clientele). “There was almost a fight at The Wizard of Oz ,” I overhear an elderly woman tell her companion on a chaise lounge. Apparently one of the passengers began recording Royal Caribbean’s intellectual property and “three guys came after him.”

I walk down a pathway to the center of the island, where a sign reads DO NOT ENTER: YOU HAVE REACHED THE BOUNDARY OF ADVENTURE . I hear an animal scampering in the bushes. A Royal Caribbean worker in an enormous golf cart soon chases me down and takes me back to the Hideaway, where I run into Mrs. Rand in a bikini. She becomes livid telling me about an altercation she had the other day with a woman over a towel and a deck chair. We Suites have special towel privileges; we do not have to hand over our SeaPass Card to score a towel. But the Rands are not Suites. “People are so entitled here,” Mrs. Rand says. “It’s like the airport with all its classes.” “You see,” I want to say, “this is where your husband’s love of Ayn Rand runs into the cruelties and arbitrary indignities of unbridled capitalism.” Instead we make plans to meet for a final drink in the Schooner Bar tonight (the Rands will stand me up).

Back on the ship, I try to do laps, but the pool (the largest on any cruise ship, naturally) is fully trashed with the detritus of American life: candy wrappers, a slowly dissolving tortilla chip, napkins. I take an extra-long shower in my suite, then walk around the perimeter of the ship on a kind of exercise track, past all the alluring lifeboats in their yellow-and-white livery. Maybe there is a dystopian angle to the HBO series that I will surely end up pitching, one with shades of WALL-E or Snowpiercer . In a collapsed world, a Royal Caribbean–like cruise liner sails from port to port, collecting new shipmates and supplies in exchange for the precious energy it has on board. (The actual Icon features a new technology that converts passengers’ poop into enough energy to power the waterslides . In the series, this shitty technology would be greatly expanded.) A very young woman (18? 19?), smart and lonely, who has only known life on the ship, walks along the same track as I do now, contemplating jumping off into the surf left by its wake. I picture reusing Duck Necklace’s words in the opening shot of the pilot. The girl is walking around the track, her eyes on the horizon; maybe she’s highborn—a Suite—and we hear the voice-over: “I’m 19 and I’m ready to go. I just don’t want a shark to eat me.”

Before the cruise is finished, I talk to Mr. Washy Washy, or Nielbert of the Philippines. He is a sweet, gentle man, and I thank him for the earworm of a song he has given me and for keeping us safe from the dreaded norovirus. “This is very important to me, getting people to wash their hands,” he tells me in his burger getup. He has dreams, as an artist and a performer, but they are limited in scope. One day he wants to dress up as a piece of bacon for the morning shift.

THE MAIDEN VOYAGE OF THE TITANIC (the Icon of the Seas is five times as large as that doomed vessel) at least offered its passengers an exciting ending to their cruise, but when I wake up on the eighth day, all I see are the gray ghosts that populate Miami’s condo skyline. Throughout my voyage, my writer friends wrote in to commiserate with me. Sloane Crosley, who once covered a three-day spa mini-cruise for Vogue , tells me she felt “so very alone … I found it very untethering.” Gideon Lewis-Kraus writes in an Instagram comment: “When Gary is done I think it’s time this genre was taken out back and shot.” And he is right. To badly paraphrase Adorno: After this, no more cruise stories. It is unfair to put a thinking person on a cruise ship. Writers typically have difficult childhoods, and it is cruel to remind them of the inherent loneliness that drove them to writing in the first place. It is also unseemly to write about the kind of people who go on cruises. Our country does not provide the education and upbringing that allow its citizens an interior life. For the creative class to point fingers at the large, breasty gentlemen adrift in tortilla-chip-laden pools of water is to gather a sour harvest of low-hanging fruit.

A day or two before I got off the ship, I decided to make use of my balcony, which I had avoided because I thought the view would only depress me further. What I found shocked me. My suite did not look out on Central Park after all. This entire time, I had been living in the ship’s Disneyland, Surfside, the neighborhood full of screaming toddlers consuming milkshakes and candy. And as I leaned out over my balcony, I beheld a slight vista of the sea and surf that I thought I had been missing. It had been there all along. The sea was frothy and infinite and blue-green beneath the span of a seagull’s wing. And though it had been trod hard by the world’s largest cruise ship, it remained.

This article appears in the May 2024 print edition with the headline “A Meatball at Sea.” When you buy a book using a link on this page, we receive a commission. Thank you for supporting The Atlantic.

Julio Teheran designated for assignment 1 day after poor results in debut with Mets

ATLANTA — New York Mets right-hander Julio Teheran was designated for assignment on Tuesday, one day after he lasted only 2 2/3 innings in his debut with the team.

The Mets selected the contract of right-hander Dedniel Núñez from Triple-A Syracuse before Tuesday night’s game against the Atlanta Braves.

Teheran, 33, gave up four runs in Monday night’s 8-7 win over the Braves. Teheran signed with New York on Friday. He began his career with Atlanta in 2011 and was an All-Star with the Braves in 2014 and 2016.

Teheran earns $2.5 million while in the majors and $150,000 while in the minors in his contract with the Mets . The deal also includes the possibility of $400,000 in performance bonuses.

Teheran spent spring training with the Baltimore Orioles but opted out of his minor league deal in late March when he didn’t make their opening-day roster. He was 3-5 with a 4.40 ERA in 11 starts and three relief appearances last year for NL Central champion Milwaukee.

Núñez, 27, pitched 3 1/3 scoreless innings in relief for Syracuse this season. He has not pitched in the majors.

AP MLB: https://apnews.com/hub/MLB

what is self assignment in c

  • Election 2024
  • Entertainment
  • Newsletters
  • Photography
  • Personal Finance
  • AP Investigations
  • AP Buyline Personal Finance
  • Press Releases
  • Israel-Hamas War
  • Russia-Ukraine War
  • Global elections
  • Asia Pacific
  • Latin America
  • Middle East
  • Election Results
  • Delegate Tracker
  • AP & Elections
  • March Madness
  • AP Top 25 Poll
  • Movie reviews
  • Book reviews
  • Personal finance
  • Financial Markets
  • Business Highlights
  • Financial wellness
  • Artificial Intelligence
  • Social Media

AP PHOTOS: 10 years after her killing, Anja Niedringhaus’ photos speak for her

FILE - A girl tries to peer through the holes of her burqa as she plays with other children in the old town of Kabul, Afghanistan, April 7, 2013. Despite Associated Press photographer Anja Niedringhaus' reputation as a war photographer, very often she found beauty and joy on assignment. (AP Photo/Anja Niedringhaus, File)

FILE - A girl tries to peer through the holes of her burqa as she plays with other children in the old town of Kabul, Afghanistan, April 7, 2013. Despite Associated Press photographer Anja Niedringhaus’ reputation as a war photographer, very often she found beauty and joy on assignment. (AP Photo/Anja Niedringhaus, File)

FILE - A girl tries to peer through the holes of her burqa as she plays with other children in the old town of Kabul, Afghanistan, Sunday, April 7, 2013. Despite Associated Press photographer Anja Niedringhaus' reputation as a war photographer, very often she found beauty and joy on assignment. (AP Photo/Anja Niedringhaus, File)

FILE - A girl tries to peer through the holes of her burqa as she plays with other children in the old town of Kabul, Afghanistan, Sunday, April 7, 2013. Despite Associated Press photographer Anja Niedringhaus’ reputation as a war photographer, very often she found beauty and joy on assignment. (AP Photo/Anja Niedringhaus, File)

  • Copy Link copied

FILE - A picture of Afghan President Hamid Karzai hangs on a wall in the main room of the district municipality in eastern Kabul on Saturday, March 29, 2014, ahead of the April 5, 2014 election to choose a new president. Associated Press photographer Anja Niedringhaus was best known as a conflict photographer. Her work helped define the wars in Iraq, Afghanistan, and Libya. (AP Photo/Anja Niedringhaus, File)

FILE - An honor guard stands next to men who arrived to mourn the death of late Vice President Field Marshal Mohammed Qasim Fahim outside his house in Kabul, Afghanistan, Monday, March 10, 2014. The influential vice president, a leading commander in the alliance that fought the Taliban who was later accused with other warlords of targeting civilian areas during the country’s civil war, died March 9, 2014. He was 57. (AP Photo/Anja Niedringhaus, File)

FILE - A topless Ukrainian protester is arrested by Swiss police after climbing up a fence at the entrance to the center where the World Economic Forum is held in Davos, Switzerland Saturday, Jan. 28, 2012. The activists are from the group Femen, which had become popular in Ukraine for staging small, half-naked protests against a range of issues including oppression of political opposition. (AP Photo/Anja Niedringhaus, File)

FILE - Serena Williams of the United States reacts after winning against Zheng Jie of China during a third round women’s singles match at the All England Lawn Tennis Championships at Wimbledon, England, Saturday, June 30, 2012. (AP Photo/Anja Niedringhaus, File)

FILE - A nomad kisses his young daughter while watching his herd in Marjah, Helmand province, Afghanistan on Oct. 20, 2012. (AP Photo/Anja Niedringhaus, File)

FILE - Britain’s Mohamed Farah celebrates as he crosses the finish line to win the men’s 5000-meter final during the athletics in the Olympic Stadium at the 2012 Summer Olympics, London, Saturday, Aug. 11, 2012. (AP Photo/Anja Niedringhaus, File)

FILE - An umpire watches the ball as a match unfolds on Court 18, as seen through wooden slats, at the All England Lawn Tennis Championships in Wimbledon, London, Wednesday, June 26, 2013. (AP Photo/Anja Niedringhaus, File)

FILE - Boys play soccer during a break at their school in Kandahar, southern Afghanistan, Tuesday, Oct 29, 2013. (AP Photo/Anja Niedringhaus, File)

FILE - Pakistani children get ready for class at Malala Yousufzai’s old school in Mingora, Swat Valley, Pakistan on Saturday, Oct 5, 2013. (AP Photo/Anja Niedringhaus, File)

FILE - A woman takes a dip in Lake Geneva at sunrise in Geneva, Switzerland on Sunday, July 21, 2013. (AP Photo/Anja Niedringhaus, File)

FILE - Afghan Army soldiers gather at a training facility on the outskirts of Kabul, Afghanistan, Wednesday, May 8, 2013. (AP Photo/Anja Niedringhaus, File)

FILE - Injured U.S. Marine Cpl. Burness Britt reacts after being lifted onto a medevac helicopter from the U.S. Army’s Task Force Lift “Dust Off,” Charlie Company 1-214 Aviation Regiment on Saturday, June 4, 2011. Britt was wounded in an IED strike near Sangin, in the Helmand Province of southern Afghanistan. During his first operation in Afghanistan he suffered a stroke and became partially paralyzed. (AP Photo/Anja Niedringhaus, File)

FILE - A woman reacts while sitting in a taxi as different television networks call the presidential race for Barack Obama, in New York on Tuesday, Nov. 4, 2008. (AP Photo/Anja Niedringhaus, File)

FILE - A young Afghan girl plays with a broken shovel outside her makeshift house at a refugee camp in Kabul, Afghanistan, Friday, May 10, 2013. Thousands of Afghans displaced by the war in their own country live in slum-like conditions in refugee camps on the edge of the capital. (AP Photo/Anja Niedringhaus, File)

FILE - Seen through the eye grid of a burqa, women walk through a market in Kabul, Afghanistan on Thursday, April 11, 2013. (AP Photo/Anja Niedringhaus, File)

FILE - A fruit seller lifts his son by his cheeks in the center of Kandahar, Afghanistan, Wednesday, March 12, 2014. (AP Photo/Anja Niedringhaus, File)

FILE - Children peek out of a bus as they leave school in Wajah Khiel, Swat Valley, Pakistan on Friday, Oct. 4, 2013. (AP Photo/Anja Niedringhaus, File)

FILE - A child is administered a polio vaccination by a district health team worker outside a children’s hospital in Peshawar, Pakistan on Wednesday, May 30, 2012. (AP Photo/Anja Niedringhaus, File)

FILE - Day laborer Zekrullah, 23, takes a break from preparing brick kilns at a factory on the outskirts of Kabul, Afghanistan, Thursday, Nov 7, 2013. (AP Photo/Anja Niedringhaus, File)

FILE - Journalists, including Associated Press photographer Anja Niedringhaus, reflected in the window at lower center, surround the car of Bouthaina Shaaban, advisor to Syrian President Assad, as she leaves after meeting with the Syrian opposition at the United Nations headquarters in Geneva, Switzerland, Switzerland, Monday, Jan. 27, 2014. On April 4, 2014, outside a heavily guarded government compound in eastern Afghanistan, Niedringhaus was killed by an Afghan police officer as she sat in her car. She was 48 years old. (AP Photo/Anja Niedringhaus, File)

If she had lived, there would have been so many more photos.

Anja could have gone to Kabul for the chaotic U.S. withdrawal, and to war-shattered Ukraine after the Russian invasion. She would have been at the Olympics, and at center court at Wimbledon. She would have been at all the places where compassionate photographers with trained eyes make it their business to be.

But on April 4, 2014, outside a heavily guarded government compound in eastern Afghanistan, Associated Press photographer Anja Niedringhaus was killed by an Afghan police officer as she sat in her car. She was 48 years old. Her colleague Kathy Gannon, who was sitting beside her, was badly wounded in the attack.

Anja had a convulsive laugh, a thick German accent and an irrepressible decency that elicited trust from the people on the other side of her lens. She trusted them back, making photographs that captured their struggle for humanity, even in some of the world’s most difficult places.

FILE - A picture of Afghan President Hamid Karzai hangs on a wall in the main room of the district municipality in eastern Kabul, Afghanistan, March 29, 2014, ahead of the April 5, 2014, election to choose a new president. (AP Photo/Anja Niedringhaus, File)

FILE - A picture of Afghan President Hamid Karzai hangs on a wall in the main room of the district municipality in eastern Kabul, Afghanistan, March 29, 2014, ahead of the April 5, 2014, election to choose a new president. (AP Photo/Anja Niedringhaus, File)

The three of us became friends in Sarajevo in the early 1990s, when ethnic fighting was savaging the former Yugoslavia and a generation of young photojournalists came into their own. Anja was at the European Pressphoto Agency. We were at the AP.

But while Anja was fiercely competitive, she was also fiercely loyal. Soon we were sharing armored cars, unheated hotel rooms, games of Yahtzee and too many Marlboros.

At a time when women journalists were rare in war zones, Anja was best known as a conflict photographer. Her work helped define the wars in Iraq, Afghanistan, and Libya. Some of the most memorable images from those dark pages in history — ones you might well recognize — came from her camera and her vision.

But Anja never made much out of being a woman surrounded by men. And to see only her conflict work would be a mistake.

FILE - An honor guard stands next to men who arrived to mourn the death of late Vice President Field Marshal Mohammed Qasim Fahim outside his house in Kabul, Afghanistan, March 10, 2014. The influential vice president, a leading commander in the alliance that fought the Taliban who was later accused with other warlords of targeting civilian areas during the country's civil war, died March 9, 2014. He was 57. (AP Photo/Anja Niedringhaus, File)

FILE - An honor guard stands next to men who arrived to mourn the death of late Vice President Field Marshal Mohammed Qasim Fahim outside his house in Kabul, Afghanistan, March 10, 2014. The influential vice president, a leading commander in the alliance that fought the Taliban who was later accused with other warlords of targeting civilian areas during the country’s civil war, died March 9, 2014. He was 57. (AP Photo/Anja Niedringhaus, File)

She was one of the great sports photographers, whether capturing Serena Williams jumping for joy after a Wimbledon victory or the immense smile of British runner Mohamed Farah as he takes Olympic gold in the 5,000-meter. She photographed everything from European elections to global summits. She mentored young photographers everywhere she went. She expertly told small stories of everyday life in dozens of countries.

And despite her reputation as a war photographer, very often she found beauty and joy on assignment — even in those difficult places where she spent so much time. And especially in the place where she ultimately lost her life.

Just look at her photos. She found joy in the moment when an Afghan nomad tenderly kissed his infant daughter, and happiness among Afghan girls finally able to go to school. She found beauty as a swimmer waded into Lake Geneva at sunrise.

She did it all. Now she is 10 years gone. And these images — the ones that were so important to her and so important to understanding a jumbled world — are what is left to speak for her.

FILE - A topless Ukrainian protester is arrested by Swiss police after climbing up a fence at the entrance to the center where the World Economic Forum is held in Davos, Switzerland, Jan. 28, 2012. The activists are from the group Femen, which had become popular in Ukraine for staging small, half-naked protests against a range of issues including oppression of political opposition. (AP Photo/Anja Niedringhaus, File)

FILE - A topless Ukrainian protester is arrested by Swiss police after climbing up a fence at the entrance to the center where the World Economic Forum is held in Davos, Switzerland, Jan. 28, 2012. The activists are from the group Femen, which had become popular in Ukraine for staging small, half-naked protests against a range of issues including oppression of political opposition. (AP Photo/Anja Niedringhaus, File)

FILE - Serena Williams of the United States reacts after winning against Zheng Jie of China during a third round women's singles match at the All England Lawn Tennis Championships at Wimbledon, England, June 30, 2012. (AP Photo/Anja Niedringhaus, File)

FILE - Serena Williams of the United States reacts after winning against Zheng Jie of China during a third round women’s singles match at the All England Lawn Tennis Championships at Wimbledon, England, June 30, 2012. (AP Photo/Anja Niedringhaus, File)

FILE - A nomad kisses his young daughter while watching his herd in Marjah, Helmand province, Afghanistan, Oct. 20, 2012. (AP Photo/Anja Niedringhaus, File)

FILE - A nomad kisses his young daughter while watching his herd in Marjah, Helmand province, Afghanistan, Oct. 20, 2012. (AP Photo/Anja Niedringhaus, File)

FILE - Britain's Mohamed Farah celebrates as he crosses the finish line to win the men's 5000-meter final during the athletics in the Olympic Stadium at the 2012 Summer Olympics, London, Aug. 11, 2012. (AP Photo/Anja Niedringhaus, File)

FILE - Britain’s Mohamed Farah celebrates as he crosses the finish line to win the men’s 5000-meter final during the athletics in the Olympic Stadium at the 2012 Summer Olympics, London, Aug. 11, 2012. (AP Photo/Anja Niedringhaus, File)

FILE - An umpire watches the ball as a match unfolds on Court 18, as seen through wooden slats, at the All England Lawn Tennis Championships in Wimbledon, London, June 26, 2013. (AP Photo/Anja Niedringhaus, File)

FILE - An umpire watches the ball as a match unfolds on Court 18, as seen through wooden slats, at the All England Lawn Tennis Championships in Wimbledon, London, June 26, 2013. (AP Photo/Anja Niedringhaus, File)

FILE - Boys play soccer during a break at their school in Kandahar, southern Afghanistan, Oct 29, 2013. (AP Photo/Anja Niedringhaus, File)

FILE - Boys play soccer during a break at their school in Kandahar, southern Afghanistan, Oct 29, 2013. (AP Photo/Anja Niedringhaus, File)

FILE - Pakistani children get ready for class at Malala Yousufzai's old school in Mingora, Swat Valley, Pakistan, Oct. 5, 2013. (AP Photo/Anja Niedringhaus, File)

FILE - Pakistani children get ready for class at Malala Yousufzai’s old school in Mingora, Swat Valley, Pakistan, Oct. 5, 2013. (AP Photo/Anja Niedringhaus, File)

FILE - A woman takes a dip in Lake Geneva at sunrise in Geneva, Switzerland, July 21, 2013. (AP Photo/Anja Niedringhaus, File)

FILE - A woman takes a dip in Lake Geneva at sunrise in Geneva, Switzerland, July 21, 2013. (AP Photo/Anja Niedringhaus, File)

FILE - Afghan Army soldiers gather at a training facility on the outskirts of Kabul, Afghanistan, May 8, 2013. (AP Photo/Anja Niedringhaus, File)

FILE - Afghan Army soldiers gather at a training facility on the outskirts of Kabul, Afghanistan, May 8, 2013. (AP Photo/Anja Niedringhaus, File)

FILE - Injured U.S. Marine Cpl. Burness Britt reacts after being lifted onto a medevac helicopter from the U.S. Army's Task Force Lift "Dust Off," Charlie Company 1-214 Aviation Regiment, June 4, 2011. Britt was wounded in an IED strike near Sangin, in the Helmand Province of southern Afghanistan. During his first operation in Afghanistan he suffered a stroke and became partially paralyzed. (AP Photo/Anja Niedringhaus, File)

FILE - Injured U.S. Marine Cpl. Burness Britt reacts after being lifted onto a medevac helicopter from the U.S. Army’s Task Force Lift “Dust Off,” Charlie Company 1-214 Aviation Regiment, June 4, 2011. Britt was wounded in an IED strike near Sangin, in the Helmand Province of southern Afghanistan. During his first operation in Afghanistan he suffered a stroke and became partially paralyzed. (AP Photo/Anja Niedringhaus, File)

FILE - A woman reacts while sitting in a taxi as different television networks call the presidential race for Barack Obama, Nov. 4, 2008, in New York. (AP Photo/Anja Niedringhaus, File)

FILE - A woman reacts while sitting in a taxi as different television networks call the presidential race for Barack Obama, Nov. 4, 2008, in New York. (AP Photo/Anja Niedringhaus, File)

FILE - A young Afghan girl plays with a broken shovel outside her makeshift house at a refugee camp in Kabul, Afghanistan, May 10, 2013. (AP Photo/Anja Niedringhaus, File)

FILE - A young Afghan girl plays with a broken shovel outside her makeshift house at a refugee camp in Kabul, Afghanistan, May 10, 2013. (AP Photo/Anja Niedringhaus, File)

FILE - Seen through the eye grid of a burqa, women walk through a market in Kabul, Afghanistan, April 11, 2013. (AP Photo/Anja Niedringhaus, File)

FILE - Seen through the eye grid of a burqa, women walk through a market in Kabul, Afghanistan, April 11, 2013. (AP Photo/Anja Niedringhaus, File)

FILE - A fruit seller lifts his son by his cheeks in the center of Kandahar, Afghanistan, March 12, 2014. (AP Photo/Anja Niedringhaus, File)

FILE - A fruit seller lifts his son by his cheeks in the center of Kandahar, Afghanistan, March 12, 2014. (AP Photo/Anja Niedringhaus, File)

FILE - Children peek out of a bus as they leave school in Wajah Khiel, Swat Valley, Pakistan, Oct. 4, 2013. (AP Photo/Anja Niedringhaus, File)

FILE - Children peek out of a bus as they leave school in Wajah Khiel, Swat Valley, Pakistan, Oct. 4, 2013. (AP Photo/Anja Niedringhaus, File)

FILE - A child is administered a polio vaccination by a district health team worker outside a children's hospital in Peshawar, Pakistan, May 30, 2012. (AP Photo/Anja Niedringhaus, File)

FILE - A child is administered a polio vaccination by a district health team worker outside a children’s hospital in Peshawar, Pakistan, May 30, 2012. (AP Photo/Anja Niedringhaus, File)

FILE - Day laborer Zekrullah takes a break from preparing brick kilns at a factory on the outskirts of Kabul, Afghanistan, Nov. 7, 2013. (AP Photo/Anja Niedringhaus, File)

FILE - Day laborer Zekrullah takes a break from preparing brick kilns at a factory on the outskirts of Kabul, Afghanistan, Nov. 7, 2013. (AP Photo/Anja Niedringhaus, File)

FILE - Journalists, including Associated Press photographer Anja Niedringhaus, reflected in the window at lower center, surround the car of Bouthaina Shaaban, advisor to Syrian President Assad, as she leaves after meeting with the Syrian opposition at the United Nations headquarters in Geneva, Switzerland, Jan. 27, 2014. On April 4, 2014, outside a heavily guarded government compound in eastern Afghanistan, Niedringhaus was killed by an Afghan police officer as she sat in her car. She was 48 years old. (AP Photo/Anja Niedringhaus, File)

FILE - Journalists, including Associated Press photographer Anja Niedringhaus, reflected in the window at lower center, surround the car of Bouthaina Shaaban, advisor to Syrian President Assad, as she leaves after meeting with the Syrian opposition at the United Nations headquarters in Geneva, Switzerland, Jan. 27, 2014. On April 4, 2014, outside a heavily guarded government compound in eastern Afghanistan, Niedringhaus was killed by an Afghan police officer as she sat in her car. She was 48 years old. (AP Photo/Anja Niedringhaus, File)

Jacqueline Larma is deputy director of photography for special projects for The Associated Press. Enric Marti is deputy director of photography for enterprise. Both are veteran AP photographers.

what is self assignment in c

IMAGES

  1. Assignment Operators in C++

    what is self assignment in c

  2. Assignment Operators in C Example

    what is self assignment in c

  3. Pointer Expressions in C with Examples

    what is self assignment in c

  4. C programming +=

    what is self assignment in c

  5. Assignment Operators in C Programming

    what is self assignment in c

  6. C Programming Tutorial

    what is self assignment in c

VIDEO

  1. How to shoot better pictures Vlog 1

  2. Assignment Operator in C Programming

  3. Augmented assignment operators in C

  4. Infosys Artificial Intelligence Primer Certification answer 100% correct (ai primer answer Infosys)

  5. Assignment Operator in C Programming

  6. INORGANIC ASSIGNMENT C BY SHASHI SIR (9810657809)

COMMENTS

  1. Self assignment check in assignment operator

    In C++, assignment operator should be overloaded with self assignment check. For example, consider the following class Array and overloaded assignment operator function without self assignment check. If we have an object say a1 of type Array and if we have a line like a1 = a1 somewhere, the program results in unpredictable behavior because ...

  2. c++

    To answer my rhetorical question: It means that a well-designed assignment operator should not need to check for self-assignment. Assigning an object to itself should work correctly (i.e. have the end-effect of "doing nothing") without performing an explicit check for self-assignment.

  3. CS253

    Assignment Operator General Outline. When a class contains a handle to external data, the assignment operator ( operator=) generally follows this pattern: Get rid of the old external data ( delete memory, close network socket, delete temporary file, unlock semaphore, etc.). Copy the resource from the other object to this object.

  4. Assignment Operators

    If self-assignment can be handled without any extra code, don't add any extra code. But do add a comment so others will know that your assignment operator gracefully handles self-assignment: Example 1a: Fred& Fred::operator= (const Fred& f) {. // This gracefully handles self assignment. *p_ = *f.p_; return *this;

  5. Assignment Expressions (GNU C Language Manual)

    7 Assignment Expressions. As a general concept in programming, an assignment is a construct that stores a new value into a place where values can be stored—for instance, in a variable. Such places are called lvalues (see Lvalues) because they are locations that hold a value. An assignment in C is an expression because it has a value; we call it an assignment expression.

  6. 21.12

    If the self-assignment guard did not exist, this function would still operate correctly during a self-assignment (because all of the operations done by the function can handle self-assignment properly). Because self-assignment is a rare event, some prominent C++ gurus recommend omitting the self-assignment guard even in classes that would ...

  7. [12] Assignment operators, C++ FAQ Lite

    For example, adding the above if test to the Fred assignment operator would make the non-self assignment case slightly less efficient (an extra (and unnecessary) conditional branch). If self assignment actually occured once in a thousand times, the if would waste cycles 99.9% of the time.

  8. What is "self assignment"?, C++ FAQ

    What is "self assignment"?, C++ FAQ. From Marshall Cline: Bjarne Stroustrup, Herb Sutter, Andrei Alexandrescu, Pearson / Addison-Wesley Publishers and I collaborated to create a new C++ Super-FAQ! It's a team effort, with huge contributions from each of us and with amazing support from dozens of brilliant editors.

  9. Are there situations when self-assignment is useful?

    To summarize the answers and discussion by now. Looks like non-trivial self-assignment can never be really useful. The only option proposed was to put an assert there in order to detect some logical errors. But there are quite legitimate self-assignment cases like a = std::min(a, b), so even this option is highly dubious.. But there are two possible implementations of a trivial self-assignment:

  10. Assignment operators

    Assignment performs implicit conversion from the value of rhs to the type of lhs and then replaces the value in the object designated by lhs with the converted value of rhs . Assignment also returns the same value as what was stored in lhs (so that expressions such as a = b = c are possible). The value category of the assignment operator is non ...

  11. Assignment operators, C++ FAQ

    From Marshall Cline: Bjarne Stroustrup, Herb Sutter, Andrei Alexandrescu, Pearson / Addison-Wesley Publishers and I collaborated to create a new C++ Super-FAQ!It's a team effort, with huge contributions from each of us and with amazing support from dozens of brilliant editors.

  12. Assignment operators

    for assignments to class type objects, the right operand could be an initializer list only when the assignment is defined by a user-defined assignment operator. removed user-defined assignment constraint. CWG 1538. C++11. E1 ={E2} was equivalent to E1 = T(E2) ( T is the type of E1 ), this introduced a C-style cast. it is equivalent to E1 = T{E2}

  13. Spring Final Exam/Assignment Policy and Self Scheduled Exams

    Faculty who give a traditional final exam may schedule the exam at the time set by the registrar or take advantage of the Academic Honor Code and offer a "take-home" exam due at the time set by the registrar for the final exam. Another option is to offer a self-scheduled exam using the process described below and on the attached "self ...

  14. Assignment Operators In C++

    In C++, the addition assignment operator (+=) combines the addition operation with the variable assignment allowing you to increment the value of variable by a specified expression in a concise and efficient way. Syntax. variable += value; This above expression is equivalent to the expression: variable = variable + value; Example.

  15. Crying Myself to Sleep on the Biggest Cruise Ship Ever

    In a collapsed world, a Royal Caribbean-like cruise liner sails from port to port, collecting new shipmates and supplies in exchange for the precious energy it has on board. (The actual Icon ...

  16. c++

    There is a (narrow) exception to the rule above: The case of your move-assignment operator being 'idempotent' for self-assignment. For example, if your assignment operator only involves assignment of the members - then it's safe to self-assign just like a regular assignment (trusting that the members' self-assignment implementations are valid). ...

  17. Self-Expanding or Balloon-Expandable TAVR in Patients with a Small

    The Kaplan-Meier estimate of the percentage of patients with bioprosthetic-valve dysfunction through 12 months was 9.4% with the self-expanding valve and 41.6% with the balloon-expandable valve ...

  18. Julio Teheran designated for assignment 1 day after poor results in

    ATLANTA — New York Mets right-hander Julio Teheran was designated for assignment on Tuesday, one day after he lasted only 2 2/3 innings in his debut with the team. The Mets selected the contract ...

  19. Why should I worry about "self assignment"?, C++ FAQ

    From Marshall Cline: Bjarne Stroustrup, Herb Sutter, Andrei Alexandrescu, Pearson / Addison-Wesley Publishers and I collaborated to create a new C++ Super-FAQ! It's a team effort, with huge contributions from each of us and with amazing support from dozens of brilliant editors. The result is "awesomer" than ever!

  20. Self assignment in C#

    Assignment copies the reference to an object, not the object contents. No customizable code runs as part of an assignment to a variable holding an object reference, ever. This is also true for structs. In C++ assignment is customizable, in C# it is not. It is safe to assign the same object reference to a variable already holding it:

  21. 10 years after her killing, Anja Niedringhaus' photos speak for her

    AP PHOTOS: 10 years after her killing, Anja Niedringhaus' photos speak for her. FILE - A girl tries to peer through the holes of her burqa as she plays with other children in the old town of Kabul, Afghanistan, April 7, 2013. Despite Associated Press photographer Anja Niedringhaus' reputation as a war photographer, very often she found ...

  22. C++

    2. Self assignment checking is done by comparing addresses of the two objects. C++ has a built in operator== for pointers of the same type. Your code is comparing the values of the two objects, and clearly you haven't defined operator== for your Person class. But comparing the values is not the right thing to do because there's no special ...