I recently wrote a line of C++ that took me three passes to read. It was not clever code. It was an ordinary constructor initializer list.
Display :: Display ( Keyboard & keyboard , int output , const Vector & position , const Vector & size , const Vector & expandTo , Screen screen ) : keyboard_ ( keyboard ) , output_ { output } , screen_ { screen } , cursor_ ( enter ( position ) ) , terminalSize_ { terminalSize ( ) } , foreground_ { RgbWhite } , background_ { RgbNone } , attributes_ { } , position_ { screen == Screen :: alternate ? Vector { 0 , 0 } : position == VectorMin ? cursor_ : position } , maxSize_ { min ( expandTo == VectorMax ? terminalSize_ : expandTo , screen == Screen :: alternate ? terminalSize_ : Vector { toDim ( terminalSize_ . x ( ) - position_ . x ( ) ) , terminalSize_ . y ( ) } ) } , text_ ( Null , size == VectorMin ? Vector { 1 , 1 } : min ( size , maxSize_ ) ) { cursor ( false ) ; makeRoom ( text_ . height ( ) ) ; keyboard .β¦