This example is arguably flawed for anything but the simplest programs, however, because connection failure is to be expected. For most programs a routine name like would be better, and the postcondition would not promise a connection, leaving it up to the caller to take appropriate steps if the connection was not opened.
This example is arguably flawed for anything but the simplest programs however because connection failure is to be expected For most programs a routine name like would be better and the postcondition would not promise a connection leaving it up to the caller to take appropriate steps if the connection was not opened