O'Reilly logo

Learn to Tango with D by Sean Kelly, Michael Parker, Kris Macleod Bell, Lars Ivar Igesund

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Input and Output

Tango offers a broad range of functionality for handling input/output (I/O). In this chapter, we introduce four principal features of the tango.io package:

  • Console I/O

  • Stream I/O

  • Network I/O

  • File handling.

First, let's get a couple of definitions out of the way. If you already familiar with the notion of streams, feel free to skip ahead.

Tango I/O is primarily stream-oriented. A stream represents a contiguous flow of data without any particular format or discernible feature. Applications may subsequently apply type or semantic structure (meaning) to the data, perhaps treating it as a set of records or lines of text. However, the flow is just a meaningless set of bytes at the raw stream level. Perhaps one common characteristic ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required