Andrei Alexandrescu Wrote: > On 10/14/2010 12:15 PM, anon wrote: > > I can't understand why we need binary vs. text modes. Seems to me a > > silly design decision from the old days when we used 7-bit terminals > > or something. This always complicates the APIs for no reason. > > A variety of Internet protocols are text-based. Also, for example I use > a text console everyday. > > > I'd like to see a two layer design: - lower UNTYPED layer that deals > > with transporting bits and bytes and deals with lower level concerns > > like byte order. - higher level extend-able TYPED layer with > > formatters/encoders. > > This would be the untyped lower level layer. > > Andrei
All I'm saying is that instead of treating text-based protocols specially at the lower level, they should be on the higher level typed as UTF-8 or whatever. They should be treated like any other protocol. E.g. I see no difference between a text file encoded in UTF8 and an image file encoded via jpeg.
